Thread (1 message) 1 message, 1 author, 2016-06-15

Re: --diff-filter=T does not list x changes

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:45:29

Anders Melchiorsen [off-list ref] writes:
Junio C Hamano [off-list ref] writes:
quoted
That documentation is quite loosely written. Typechange diff is what
T has always meant, and it never was about the executable bit. The
word "mode" in that sentence only means the upper bits
S_IFREG/S_IFLNK (iow, masked by S_IFMT).
I hope you agree that this reading is not obvious from the
documentation,...
Yup, didn't I already say that the documentation is buggy?
How about adding a diff-filter=X for the executable bit?
I do not think it is a good idea for two reasons.  Backward compatibility
and sane design.

For one thing, "diff --name-status" never shows X, so you would introduce
an unnecessary inconsistency.  If you change "--name-status" to avoid
that, you would be breaking people's existing scripts that expect to see
"M" for such a change.

Even if you were forgiven by these people whose scripts are broken by your
change, you need to decide between "M" and "X" when both contents and
executable bit are changed.  The least surprising logic would probably be
to show "X" when _only_ executable bit is changed and show "M" when
contents changed (even when executable bit also did), but that feels quite
arbitrary.  And the other way around isn't any better.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help