Mercurial > public > mercurial-scm > hg-stable
diff mercurial/patch.py @ 31821:66a9faadbc83
patch: make diff in git mode respect --text option (issue5510)
This changeset makes patch respect -a/--text option in --git mode by aligning
its behaviour with git itself.
author | Alexander Fomin <afomin@fb.com> |
---|---|
date | Wed, 05 Apr 2017 15:15:06 -0700 |
parents | 6c80f985a13c |
children | fde4822b0102 |
line wrap: on
line diff
--- a/mercurial/patch.py Wed Apr 05 00:34:58 2017 +0900 +++ b/mercurial/patch.py Wed Apr 05 15:15:06 2017 -0700 @@ -2552,7 +2552,7 @@ elif revs and not repo.ui.quiet: header.append(diffline(path1, revs)) - if binary and opts.git and not opts.nobinary: + if binary and opts.git and not opts.nobinary and not opts.text: text = mdiff.b85diff(content1, content2) if text: header.append('index %s..%s' %