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

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

From
YDYann Dirson <ydirson@linagora.com>
Date
Aug 28, 2009, 11:02 UTC
Message-ID
<54e098c45bffbf870bdfcee26b9ddecc.squirrel@intranet.linagora.com>

$ echo foo > bar $ git add -N bar $ ./git --exec-path=$PWD stash save bar: not added yet fatal: git-write-tree: error building trees Cannot save the current index state

Maybe it would require some magic in git-stash to detect/save/restore that particular state, or "just" to cause "add -N" to insert an empty file instead ?

I suspect that second solution would not be particularly popular, but I don't find the 1st one very appealing, it just looks like breaking the whole idea behind git-stash :)

Next: Jeff King
Message 1 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.