https://bz.mercurial-scm.org/show_bug.cgi?id=5479
Bug ID: 5479 Summary: `hg diff --stat` gets confused by lines that start with "-- " or "++ " Product: Mercurial Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Severity: bug Priority: wish Component: Mercurial Assignee: bugzi...@mercurial-scm.org Reporter: h...@pewpew.net CC: mercurial-de...@selenic.com Created attachment 1947 --> https://bz.mercurial-scm.org/attachment.cgi?id=1947&action=edit test that shows the issue (as patch from test-diffstat.t) Note: possible duplicate of 1123? That claims that diffstat was an external tool, though, so while the issue might be similar, I don't think it's a strict duplicate. If a line in a file starts with "-- " and is changed, `hg diff --stat` doesn't count it as a deletion. Similarly, if the new version of the line starts with "++ ", it is not counted as an addition. This can lead to diffstat claiming 0 diffs even if there are some: $ hg diff --root . diff -r 32e517bb8958 file --- a/file Thu Jan 01 00:00:00 1970 +0000 +++ b/file * (glob) @@ -1,3 +1,3 @@ line 1 --- line 2, with dashes +++ line 2, switched dashes to plusses line 3 This is wrong: does not count either, because both lines look like file headers. $ hg diff --root . --stat file | 0 1 files changed, 0 insertions(+), 0 deletions(-) -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel