[PATCH] log: make {diffstat} work with diff.noprefix (issue4755)

Gregory Szorc gregory.szorc at gmail.com
Mon Dec 21 11:22:54 CST 2015


On Mon, Dec 21, 2015 at 8:08 AM, Jun Wu <quark at fb.com> wrote:

> # HG changeset patch
> # User Jun Wu <quark at fb.com>
> # Date 1450210516 0
> #      Tue Dec 15 20:15:16 2015 +0000
> # Node ID a71a4c67b0d1505c68364b13a525f2dbef886a90
> # Parent  5df74b2f296df7f44a08106df4f9dd97a5aa726a
> log: make {diffstat} work with diff.noprefix (issue4755)
>
> We expect "diff --git a/$PATHA b/$PATHB" with diff.git=1. But
> diff.noprefix=1
> breaks such expection. Fix it by reading file paths from following lines.
>
>
Internally, you can produce diffs with various options, ignoring userland
settings. See patch.diffopts and friends. Is there a reason you chose to
change the diff parser instead of having {diffstat} generate a diff in a
well-defined (and currently supported) format?

Also, I have recollections of attempting to fix this bug and running into
problems with filenames containing spaces. Something something about the
git diff format with no leading a/ and b/ having nebulous behavior with
regards to files with spaces or something like that. That's why I think
using a consistently generated diff internally might be the way to go.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20151221/ea8d1940/attachment.html>


More information about the Mercurial-devel mailing list