Re: git-diff new files (without using index)
- From
Miles Bader <miles@gnu.org>
- Date
- Aug 5, 2007, 04:00 UTC
- Message-ID
- <87r6miljfr.fsf@catnip.gol.com>
- In-Reply-To
- <20070805035245.GE9527@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> writes:
Show 5 quoted lines
>> If I add things to the index, I can use "git-diff --cached" to do it; >> however I'd actually like to be able to do this _without_ updating the >> index > > Use a temporary index:
...
> Another option is to just add everything, then reset the index:
...
> Granted if you had other files staged they just became unstaged > and will need to be restaged... the temporary index trick above > avoids that.
Thanks for the tip (I guess I can roll my own "git-diff-uncached" script)!
The above sort of quirkiness does seem kind of a wart though; in my (admittedly limited, using git) experience this sort of thing really reduces the utility of the index, and I often end up feeling like it's just getting in the way as a result. Does adding something like a "git-diff -N" option seem a _bad_ idea?
Thanks,
-Miles
-- "Suppose He doesn't give a shit? Suppose there is a God but He just doesn't give a shit?" [George Carlin]