Re: [PATCH] fix show_entry() in tree-diff.c for TREE_IN_RECURSIVE
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:57
"Nick Edelen" [off-list ref] 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 <redacted>
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.