From: Junio C Hamano <gitster@pobox.com>
To: Anders Melchiorsen <mail@cup.kalibalik.dk>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Re: --diff-filter=T does not list x changes
Date: Fri, 17 Oct 2008 01:29:09 -0700 [thread overview]
Message-ID: <7v1vyfoca2.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <87ej2fvgv9.fsf@kalibalik.dk> (Anders Melchiorsen's message of "Fri, 17 Oct 2008 09:08:10 +0200")
Anders Melchiorsen <mail@cup.kalibalik.dk> writes:
> 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.
next prev parent reply other threads:[~2008-10-17 8:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-15 18:42 --diff-filter=T does not list x changes Anders Melchiorsen
2008-10-16 10:22 ` Jeff King
2008-10-17 2:00 ` Junio C Hamano
2008-10-17 7:08 ` Anders Melchiorsen
2008-10-17 8:29 ` Junio C Hamano [this message]
2008-10-17 19:33 ` Anders Melchiorsen
2008-10-17 23:58 ` Junio C Hamano
2008-10-18 8:49 ` [PATCH] Documentation: diff-filter=T only tests for symlink changes Anders Melchiorsen
2008-10-18 13:40 ` Nanako Shiraishi
2008-10-18 18:37 ` Junio C Hamano
2008-10-18 18:08 ` Junio C Hamano
2008-10-19 1:04 ` Nanako Shiraishi
2008-10-19 10:29 ` Anders Melchiorsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7v1vyfoca2.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mail@cup.kalibalik.dk \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).