Re: [RFC/PATCH] reset: accept "git reset <removed file>"
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Oct 19, 2010, 00:23 UTC
- Message-ID
- <20101019002349.GB9841@burratino>
- In-Reply-To
- <7viq0z2gxj.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> Makes me wonder > > - if we can/want to have a logic like this inside verify_filename();
Yes, I think so. I was worried that this would be confusing for some command that looks to the worktree, like git grep without --cached, but I suspect that worry was unfounded.
The one case I am worried about is "git rev-parse". What is "git rev-parse <path>" supposed to be used for?
> - if we need a corresponding logic in either the previous else/if cascade > that calls verify_non_filename(), or in verify_non_filename() itself.
Yes.
Is it safe to load the index so early? I can imagine a person trying "git reset" to recover from a corrupted index; are we regressing in that respect and how would one check for it?