Re: git-diff on touched files: bug or feature?
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 2, 2007, 09:51 UTC
- Message-ID
- <Pine.LNX.4.64.0708021050500.14781@racer.site>
- In-Reply-To
- <vpqhcni47ek.fsf@bauges.imag.fr>
Hi,
On Thu, 2 Aug 2007, Matthieu Moy wrote:
Show 26 quoted lines
> Junio C Hamano <gitster@pobox.com> writes: > > > Matthieu Moy <Matthieu.Moy@imag.fr> writes: > > > >> $ touch bar > >> $ git diff > >> diff --git a/bar b/bar <--- here ---< > >> $ git status > >> # On branch master > >> nothing to commit (working directory clean) > >> $ git diff <--- status updated > >> the stat in the index. > >> > >> Is this intended, > > > > Yes. Very much so, intentionally, from very early days of git. > > This serves as a reminder to the user that he started editing > > but changed his mind to end up with the same contents as the > > original, until the next "update-index --refresh" (which is > > internally invoked from "status"). > > > > If the feature still makes sense in the modern world is a > > different story, but I do find it useful. > > I understand that it can be usefull, but I really don't like having it > by default (is there a way to deactivate it BTW?).
Yes. Just call "git status" and be done with it.
Ciao, Dscho