summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0906f6e)
raw | patch | inline | side by side (parent: 0906f6e)
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) |
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>
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 | patch | blob | history |
diff --git a/git-am.sh b/git-am.sh
index 6cdd5910db50c96df3d149fba172750cb10c09cb..f1a03c912824a264cbe29905d53e2fe58c2c9dd6 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
fi
fi
+git update-index -q --refresh
+
case "$resolved" in
'')
case "$HAS_HEAD" in