Re: [PATCH v12 18/26] stash: convert push to builtin
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Feb 19, 2019, 00:23 UTC
- Message-ID
- <20190219002336.GN1622@szeder.dev>
- In-Reply-To
- <20190212231837.GI6085@hank.intra.tgummerer.com>
On Tue, Feb 12, 2019 at 11:18:37PM +0000, Thomas Gummerer wrote:
Show 5 quoted lines
> Thanks. I still didn't manage to reproduce it locally, but I was now > able to test it on Travis CI. > > The diff below fixes the issue, but I still need to spend some time to > better understand why it does.
There is nothing like a fix that works, but you have no idea why :)
FWIW, I'm at a couple of thousands of '--stress' repetitions with your patch below, and not a single failure yet.
Show 18 quoted lines
> I'll hopefully be in a position to > send a patch with a proper log message why this is the right fix in > the next couple of days. > > diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c > index c77f62c895..3dab488bd6 100644 > --- a/builtin/stash--helper.c > +++ b/builtin/stash--helper.c > @@ -231,6 +231,7 @@ static int reset_tree(struct object_id *i_tree, int update, int reset) > struct tree *tree; > struct lock_file lock_file = LOCK_INIT; > > + discard_cache(); > read_cache_preload(NULL); > if (refresh_cache(REFRESH_QUIET)) > return -1; > >