Re: [PATCH] Add --show-touched option to show "diff --git" line when contents are unchanged
- From
David Kastrup <dak@gnu.org>
- Date
- Aug 6, 2007, 16:10 UTC
- Message-ID
- <86bqdkbq59.fsf@lola.quinscape.zz>
- In-Reply-To
- <7vir7wmk84.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <gitster@pobox.com> writes:
Show 13 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > >> But I'd really think that what should be done (if anything has to be done >> at all) is to introduce a config variable which triggers the same logic in >> git-diff as was introduced in 2b5f9a8c0cff511f2bb0833b1ee02645b79323f4. > > Sorry, I don't follow at all. The diff toolchain works all > inside core without having to write a temporary index out, which > was the issue the commit you are quoting was about. > > In any case, enough discussion. Here is an updated patch, which > I _could_ be pursuaded to consider for inclusion after v1.5.3 > happens, if there are enough agreements and Acks.
Ack, ack, ack. The current default behavior is plainly unusable. For example, I've rsynced -a a tree including .git, and suddenly git-diff goes out of kilter. And stops doing so when running git-status once.
This is the worst kind of "unpredictable", and I don't care one bit that there are conceivable use cases.
I don't even think it prudent to _offer_ the --show-touched option in a porcelain such as git-diff as long as purportedly read-only porcelain commands like git-status can trash the state: what is reported is not actually "touched" but something internal to the operation of git.
At least not without a notice in the manual that this option might or might not work, depending on what one did previously.
-- David Kastrup