~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix a merge case with files added in both heads but different
[stgit]
/
stgit
/
git.py
diff --git
a/stgit/git.py
b/stgit/git.py
index
13f7b87
..
21d74dd
100644
(file)
--- 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:
# 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],
stages = files[path]
if gitmergeonefile.merge(stages['1'][1], stages['2'][1],
stages['3'][1], path, stages['1'][0],