Re: "git apply --check" successes but git am says "does not match index"
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 15, 2011, 23:52 UTC
- Message-ID
- <7vhb5ijkq0.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20110815232318.GA4699@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 8 quoted lines
> We should perhaps call "update-index --refresh" at the start to avoid > these sorts of false positives. Probably it should happen whenever we > "git am --continue", as well. But for efficiency reasons, not between > each patch. > > I dunno. Do people want to call "git am" in a tight loop, where the > index refresh would be a problem? I would think they should instead feed > a whole mbox in one go.
I am kind of surprised that we have not done the 'refresh once upfront' already and nobody ever run into this for the past 5 years. It seems that I inherited that behaviour from git-applymbox ;-)
It is sensible to refresh once at the beginning and also when restarting with "am --resolved".