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

Re: [BUG] git stash refuses to save after "add -N"

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 31, 2009, 05:03 UTC
Message-ID
<7vljl0lgms.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20090831042724.GA16646@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 15 quoted lines
> My concerns are:
>
>   - "-f" is kind of vague. Would people expect it to force aspects of
>     the stash? Should it be "--intent-as-empty"?
>
>   - the error message is still a bit muddled, because you get the "not
>     yet added" files _first_, then some failure cruft from write-tree,
>     and _then_ the trying-to-be-helpful message
>
> I dunno. Honestly I am a bit lukewarm about this whole thing, as it
> seems like something that just wouldn't come up that often, and while
> the current error message is a bit disorganized, I think a user who has
> used "git add -N" can figure out that it is related (the only report we
> have is from Yann, who _did_ figure it out, but wanted to know how to
> make git handle the situation better).

I am not sure if asking for positive confirmation with "-f" is even worth it. As you pointed out in your earlier message, which prompted me to respond with a patch, when this codepath is exercised, the user is in a rush, and I do not see what else the user would want to do other than including it in the stash by rerunning with -f.

Previous: Jeff KingNext: Jeff King
Message 8 of 11 in “[BUG] git stash refuses to save after "add -N"”
  1. Yann DirsonAug 28, 2009
  2. Jeff KingAug 28, 2009
  3. Jeff KingAug 28, 2009
  4. Junio C HamanoAug 29, 2009
  5. Jeff KingAug 30, 2009
  6. Junio C HamanoAug 30, 2009
  7. Jeff KingAug 31, 2009
  8. Junio C HamanoAug 31, 2009
  9. Jeff KingAug 31, 2009
  10. Yann DirsonAug 31, 2009
  11. Jeff KingAug 31, 2009

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.