X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/7c53fcf57614af48846b4684556178dadebb8f82..8d4155530f85a38980acdd6c5716e6f684c4d79f:/stgit/git.py diff --git a/stgit/git.py b/stgit/git.py index 13f7b87..21d74dd 100644 --- a/stgit/git.py +++ b/stgit/git.py @@ -629,6 +629,15 @@ def merge(base, head1, head2): # merge the unmerged files errors = False for path in files: + # remove additional files that might be generated for some + # newer versions of GIT + for suffix in [base, head1, head2]: + if not suffix: + continue + fname = path + '~' + suffix + if os.path.exists(fname): + os.remove(fname) + stages = files[path] if gitmergeonefile.merge(stages['1'][1], stages['2'][1], stages['3'][1], path, stages['1'][0],