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

Re: [QUESTION] or [BUG] Could not stash new bin files

From
Jeff King <peff@peff.net>
Date
Apr 19, 2010, 12:41 UTC
Message-ID
<20100419124117.GA20184@coredump.intra.peff.net>
In-Reply-To
<20100419093523.GA26342@progeny.tock>
On Mon, Apr 19, 2010 at 04:35:23AM -0500, Jonathan Nieder wrote:
Show 7 quoted lines
> >     $ git add -N XXX/src/jrxml/*.xls
> >     $ git stash save --keep-index "Improving performance of views"
> >     XXX/src/jrxml/SubCellMatrixCompared-EXPLAIN-new.xls: not added yet
> >     XXX/src/jrxml/SubCellMatrixCompared-EXPLAIN-old.xls: not added yet
> >     fatal: git-write-tree: error building trees
> 
> Yes, this is a known problem [1].
Thanks for the pointer.

Re-reading that thread, and considering the fact that this comes up so rarely, I think leaving it as an error is fine. We could possibly give a bit more advice on how to proceed, though.

Show 6 quoted lines
> > Specificities:
> > 
> > * I have a file in the index that I do not want to stash
> 
> Could you explain this further?  The stash currently saves everything
> about the current state (except files not in the index nor HEAD).

Yeah, I'm not really sure why intent-to-add is being used here at all, instead of regular "git add".

But if the real problem is wanting to stash part of your changes, then the best thing is probably to use the interactive "git stash -p".

> > * The two new files are binary files

I don't think that is relevant here. The intent-to-add bit is the problem.

-Peff
Previous: Jonathan Nieder
Message 3 of 3 in “[QUESTION] or [BUG] Could not stash new bin files”
  1. Arnauld Van MuysewinkelApr 19, 2010
  2. Jonathan NiederApr 19, 2010
  3. Jeff KingApr 19, 2010

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.