Re: [PATCH] diff: correct newline in summary for renamed files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 27, 2017 at 03:51:26PM -0700, Stefan Beller wrote:

> In 146fdb0dfe (diff.c: emit_diff_symbol learns about DIFF_SYMBOL_SUMMARY,
> 2017-06-29), the conversion from direct printing to the symbol emission
> dropped the new line character for renamed, copied and rewritten files.
> 
> Add the emission of a newline, add a test for this case.
> 
> Reported-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> Helped-by: Jeff King <peff@xxxxxxxx>
> Signed-off-by: Stefan Beller <sbeller@xxxxxxxxxx>
> ---
> 
>  Peff, I am undecided about the added 'diff --stat' call as that
>  uses a completely different code path and would not show the mode
>  change, but I guess we can just use it to document the current state.

Yeah, I agree it isn't showing much. I was mostly thinking it just made
sense to test a bunch of formats across a mode change to make sure they
all showed something reasonable. But it's a rather unlikely bug that
"--stat" would _start_ showing something that it's not supposed.

I suppose that "--patch" should also possibly be included, though I'd be
surprised if that isn't covered elsewhere (but then, I was surprised
that --summary wasn't covered either).

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux