Re: [PATCH] fix show_entry() in tree-diff.c for TREE_IN_RECURSIVE

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

 



"Nick Edelen" <sirnot@xxxxxxxxx> writes:

> fix show_entry() in tree_diff.c to display tree entries on TREE_IN_RECURSIVE

s/fix/Fix/; s/$/./;

> Signed-off-by: Nick Edelen <sirnot@xxxxxxxxx>

> this seems like how it should act: trees are shown under this option for
> changes,...

Please show a sample input, the output you expect and the output from the
current code, to illustrate the alleged breakage better.

For example. if you used to have files dc/1, dr/2, dt/3, fc, fr and ft and
then removed dr/2, dt/3, fr, ft and added da/5, fa, dt and ft/4, you
expect this output.

$ git diff -t -r --raw HEAD^ HEAD
:000000 040000 0000000... a13e5ad... A	da
:000000 100644 0000000... ce01362... A	da/5
:040000 040000 8dc877a... 40b5137... M	dc
:100644 100644 e69de29... ce01362... M	dc/1
:040000 000000 f84fc27... 0000000... D	dr
:100644 000000 e69de29... 0000000... D	dr/2
:000000 100644 0000000... ce01362... A	dt
:040000 000000 6e36c7d... 0000000... D	dt
:100644 000000 e69de29... 0000000... D	dt/3
:000000 100644 0000000... ce01362... A	fa
:100644 100644 e69de29... ce01362... M	fc
:100644 000000 e69de29... 0000000... D	fr
:100644 000000 e69de29... 0000000... D	ft
:000000 040000 0000000... 9a1efba... A	ft
:000000 100644 0000000... ce01362... A	ft/4

But because we show 040000 entries only for changed and typechange cases, 
we currently get this.

$ git diff -t -r --raw HEAD^ HEAD
:000000 100644 0000000... ce01362... A	da/5
:040000 040000 8dc877a... 40b5137... M	dc
:100644 100644 e69de29... ce01362... M	dc/1
:100644 000000 e69de29... 0000000... D	dr/2
:000000 100644 0000000... ce01362... A	dt
:100644 000000 e69de29... 0000000... D	dt/3
:000000 100644 0000000... ce01362... A	fa
:100644 100644 e69de29... ce01362... M	fc
:100644 000000 e69de29... 0000000... D	fr
:100644 000000 e69de29... 0000000... D	ft
:000000 100644 0000000... ce01362... A	ft/4

I think the output from the code after your change is more consistent, but
I somehow suspect that this might break people's script, like gitweb,
rather badly, if they depended on the existing behaviour.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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]