git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 17, 2008, 08:29 UTC
Message-ID
<7v1vyfoca2.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<87ej2fvgv9.fsf@kalibalik.dk>
Anders Melchiorsen <mail@cup.kalibalik.dk> writes:
Show 9 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> 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.

Previous: Anders MelchiorsenNext: Anders Melchiorsen
Message 5 of 13 in “--diff-filter=T does not list x changes”
  1. Anders MelchiorsenOct 15, 2008
  2. Jeff KingOct 16, 2008
  3. Junio C HamanoOct 17, 2008
  4. Anders MelchiorsenOct 17, 2008
  5. Junio C HamanoOct 17, 2008
  6. Anders MelchiorsenOct 17, 2008
  7. Junio C HamanoOct 17, 2008
  8. Documentation: diff-filter=T only tests for symlink changesAnders Melchiorsen, Oct 18, 2008
  9. Nanako ShiraishiOct 18, 2008
  10. Junio C HamanoOct 18, 2008
  11. Junio C HamanoOct 18, 2008
  12. Nanako ShiraishiOct 19, 2008
  13. Anders MelchiorsenOct 19, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.