Re: Can't git stash after using git add -N
- From
Jeff King <peff@peff.net>
- Date
- Mar 16, 2016, 21:18 UTC
- Message-ID
- <20160316211833.GC2200@sigill.intra.peff.net>
- In-Reply-To
- <CAPc5daVnQ94jc8pP=-FUgRA7oS=vXNGG=5Z23NWuZZScnhkQ9g@mail.gmail.com>
On Wed, Mar 16, 2016 at 02:11:19PM -0700, Junio C Hamano wrote:
Show 6 quoted lines
> I actually think "silently ignore intent-to-add" was a mistake. > We used to error out at write-tree time, which I think is the > right behaviour--"I know I want to have this path, but I cannot > yet decide with what content" is what the user is telling us when > she says "add -N", so until that indecision is resolved, we > shouldn't write out a tree object out of the index.
Yeah, I am inclined to agree, and I _thought_ we also used to error out during write-tree, but I failed to find the spot where we switched (thinking that it might provide some rationale).
I think I just didn't look far enough back, though. Commit 3f6d56d (commit: ignore intent-to-add entries instead of refusing, 2012-02-07) does not exactly have a sneaky title.
-Peff