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

Re: Fix recent 'unpack_trees()'-related changes breaking 'git stash'

From
Szeder Gábor <szeder@ira.uka.de>
Date
Mar 15, 2008, 11:31 UTC
Message-ID
<20080315113154.GA10921@elysium.homelinux.org>
In-Reply-To
<alpine.LFD.1.00.0803142133160.3557@woody.linux-foundation.org>
On Fri, Mar 14, 2008 at 09:40:02PM -0700, Linus Torvalds wrote:
Show 13 quoted lines
> So it might be better to make that thing be just
> 
> >  	memset(&o->result, 0, sizeof(o->result));
> > +	if (o->src_index)
> > +		o->result.timestamp = o->src_index->timestamp;
> >  	o->merge_size = len;
> 
> instead of checking both src_index *and* dst_index. The source index is 
> all that matters anyway. Even if 'o->result' isn't used in the end, who 
> cares? We can still give it the right timestamp.
> 
> And no, this really isn't likely to matter, but let's pick the simpler 
> version if it doesn't matter.

I have applied the above patch and run both my stripped-down testcase and t3903-stash.sh a couple thousand times without a single failure.

Best, Gábor

Previous: Linus TorvaldsNext: Junio C Hamano
Message 4 of 8 in “recent 'unpack_trees()'-related changes break 'git stash'”
  1. SZEDER GáborMar 15, 2008
  2. Fix recent 'unpack_trees()'-related changes breaking 'git stash'Linus Torvalds, Mar 15, 2008
  3. Linus TorvaldsMar 15, 2008
  4. Szeder GáborMar 15, 2008
  5. Junio C HamanoMar 15, 2008
  6. Szeder GáborMar 15, 2008
  7. Linus TorvaldsMar 15, 2008
  8. git-stash: use git-read-tree --index-output optionしらいしななこ, Mar 30, 2008

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.