Skip to content
  • Jeff King's avatar
    am: refresh the index at start and --resolved · 2a6f08ac
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    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: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    2a6f08ac