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