##// END OF EJS Templates
diff: add nobinary config to suppress git-style binary diffs
Stephen Lee -
r21790:3fbef7ac default
parent child Browse files
Show More
@@ -37,6 +37,7 b' class diffopts(object):'
37 37 'showfunc': False,
38 38 'git': False,
39 39 'nodates': False,
40 'nobinary': False,
40 41 'ignorews': False,
41 42 'ignorewsamount': False,
42 43 'ignoreblanklines': False,
@@ -1561,6 +1561,7 b' def diffopts(ui, opts=None, untrusted=Fa'
1561 1561 text=opts and opts.get('text'),
1562 1562 git=get('git'),
1563 1563 nodates=get('nodates'),
1564 nobinary=get('nobinary'),
1564 1565 showfunc=get('show_function', 'showfunc'),
1565 1566 ignorews=get('ignore_all_space', 'ignorews'),
1566 1567 ignorewsamount=get('ignore_space_change', 'ignorewsamount'),
@@ -1815,7 +1816,7 b' def trydiff(repo, revs, ctx1, ctx2, modi'
1815 1816 if dodiff:
1816 1817 if opts.git or revs:
1817 1818 header.insert(0, diffline(join(a), join(b), revs))
1818 if dodiff == 'binary':
1819 if dodiff == 'binary' and not opts.nobinary:
1819 1820 text = mdiff.b85diff(to, tn)
1820 1821 if text:
1821 1822 addindexmeta(header, [gitindex(to), gitindex(tn)])
@@ -37,4 +37,8 b''
37 37
38 38 $ hg diff --git -r 0 -r 2
39 39
40 $ hg diff --config diff.nobinary=True --git -r 0 -r 1
41 diff --git a/binfile.bin b/binfile.bin
42 Binary file binfile.bin has changed
43
40 44 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now