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

Jun Wu quark at fb.com
Mon Dec 21 11:58:10 CST 2015


Yes. Filenames like "a/b b/a a/b" can be an issue. I am aware of
that when making the change and reported it in issue5021. And
thanks for pointing out patch.diffopts.

Not fixing it here is because issue4755 is tagged as "easy" and I
thought the final fix would be a separate, non-trivial patch.

I agree that the proper way should be switching to a well defined
data structure. I will try that approach.

On 12/21/2015 05:22 PM, Gregory Szorc wrote:
> 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.


More information about the Mercurial-devel mailing list