comparison mercurial/commands.py @ 31822:fde4822b0102

diff: add --binary option for git mode diffs This patch adds --binary option to `hg diff` and `hg export` to allow more control about when binary diffs are displayed in Git mode as well as some tests to verify it behaves correctly (issue5510).
author Alexander Fomin <afomin@fb.com>
date Wed, 05 Apr 2017 15:31:08 -0700
parents 2b130e26c3a4
children 9fce17c4a7b3
comparison
equal deleted inserted replaced
31821:66a9faadbc83 31822:fde4822b0102
160 ] + templateopts 160 ] + templateopts
161 161
162 diffopts = [ 162 diffopts = [
163 ('a', 'text', None, _('treat all files as text')), 163 ('a', 'text', None, _('treat all files as text')),
164 ('g', 'git', None, _('use git extended diff format')), 164 ('g', 'git', None, _('use git extended diff format')),
165 ('', 'binary', None, _('generate binary diffs in git mode (default)')),
165 ('', 'nodates', None, _('omit dates from diff headers')) 166 ('', 'nodates', None, _('omit dates from diff headers'))
166 ] 167 ]
167 168
168 diffwsopts = [ 169 diffwsopts = [
169 ('w', 'ignore-all-space', None, 170 ('w', 'ignore-all-space', None,