author | Jeff King <peff@peff.net> | |
Tue, 16 Aug 2011 00:13:07 +0000 (17:13 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 16 Aug 2011 18:15:41 +0000 (11:15 -0700) | ||
commit | 2a6f08ac1f6949ed0072aed3240bc04d80051851 | |
tree | 44153da21a1f570db5e9d2322c97daee8cf6e380 | tree | snapshot |
parent | 0906f6e14e6e9df0c4ea4edb08ebe9f5d16c2391 | commit | diff |
am: refresh the index at start and --resolved
If a file is unchanged but stat-dirty, we may erroneously
fail to apply patches, thinking that they conflict with a
dirty working tree.
This patch adds a call to "update-index --refresh". It comes
as late as possible, so that we don't bother with it for
thinks like "git rebase --abort", or when mbox-splitting
fails. However, it does come before we actually start
applying patches, meaning we will only call it once when we
start applying patches (or any time we return to "am" after
having resolved conflicts), and not once per patch.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
If a file is unchanged but stat-dirty, we may erroneously
fail to apply patches, thinking that they conflict with a
dirty working tree.
This patch adds a call to "update-index --refresh". It comes
as late as possible, so that we don't bother with it for
thinks like "git rebase --abort", or when mbox-splitting
fails. However, it does come before we actually start
applying patches, meaning we will only call it once when we
start applying patches (or any time we return to "am" after
having resolved conflicts), and not once per patch.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-am.sh | diff | blob | history |