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

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

From
Jeff King <peff@peff.net>
Date
Aug 28, 2009, 19:22 UTC
Message-ID
<20090828192217.GA13023@coredump.intra.peff.net>
In-Reply-To
<20090828190531.GB11488@coredump.intra.peff.net>
On Fri, Aug 28, 2009 at 03:05:31PM -0400, Jeff King wrote:
Show 5 quoted lines
> For the index case, we unfortunately cannot represent the situation in
> the index using a tree, which means we cannot have a stash that doesn't
> lose information. So we have to choose either dropping those index
> entries, inserting them as blank files, or inserting them with
> working-tree contents.

Actually, you _could_ try representing the information by shoe-horning it into the tree. For example, by allocating a bit of the mode as "intent-to-add". That seems pretty ugly to me, though.

You could also try to stick the information in the stash's commit message and recreate it during "stash apply". But again, that feels kind of ugly.

-Peff
Previous: Jeff KingNext: Junio C Hamano
Message 3 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.