Re: [PATCH] git-rm: don't remove newly added file without -f
- From
Junio C Hamano <junkio@cox.net>
- Date
- Mar 26, 2007, 21:11 UTC
- Message-ID
- <7v1wjbwvzl.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20070326185539.GA1650@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 9 quoted lines
> Given this set of commands: > > $ echo "newly added file" >new > $ git add new > $ git rm new > > the file "new" was previously removed from the working > directory and the index. Because it was not in HEAD, it is > available only by searching for unreachable objects.
I am not sure if this is a problem, as the user asked it to be removed. It somehow feels to me that the change (I am not convinced your patch should be called a "fix" rather than a "behaviour change") would cause more confusion.
Unstaging request would have looked like "git reset HEAD new", wouldn't it?