Mercurial > hg-stable
diff mercurial/commands.py @ 9642:7d17794f08a9
diffstat: with --git, mark binary files with Bin
Normally, diffs without any text insertions or deletions are reported
as having 0 lines changed by stock diffstat. Compatibility is
preserved with stock diffstat in this case, but when using --git,
binary files are marked with Bin as a means of clarification.
git diff --stat does something similar, though it also includes the
old and new file sizes.
author | Brodie Rao <me+hg@dackz.net> |
---|---|
date | Sun, 25 Oct 2009 02:53:33 +0200 |
parents | 9e76232fbfbe |
children | c6b721da201b |
line wrap: on
line diff
--- a/mercurial/commands.py Sun Oct 25 02:52:36 2009 +0200 +++ b/mercurial/commands.py Sun Oct 25 02:53:33 2009 +0200 @@ -1098,12 +1098,14 @@ if stat: opts['unified'] = '0' + diffopts = patch.diffopts(ui, opts) m = cmdutil.match(repo, pats, opts) - it = patch.diff(repo, node1, node2, match=m, opts=patch.diffopts(ui, opts)) + it = patch.diff(repo, node1, node2, match=m, opts=diffopts) if stat: width = ui.interactive() and util.termwidth() or 80 - ui.write(patch.diffstat(util.iterlines(it), width=width)) + ui.write(patch.diffstat(util.iterlines(it), width=width, + git=diffopts.git)) else: for chunk in it: ui.write(chunk)