git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Junio C Hamano
Message 9 of 9 in “Can't git stash after using git add -N”
  1. Josh TriplettMar 15, 2016
  2. Junio C HamanoMar 15, 2016
  3. Josh TriplettMar 16, 2016
  4. Junio C HamanoMar 16, 2016
  5. Duy NguyenMar 16, 2016
  6. Josh TriplettMar 16, 2016
  7. Jeff KingMar 16, 2016
  8. Junio C HamanoMar 16, 2016
  9. Jeff KingMar 16, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.