merge-recursive: Fix limited output of rename messages
The previous code did the right thing, but it did it by accident. Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
Fredrik Kuivinen committed
Nov 9, 2005 at 11:36 UTC
c8a4f5e5422677b950e7e74b29fa6631fd8ce243
1 file changed
+4
-8
git-merge-recursive.py
+4
-8
@@ -162,13 +162,10 @@ def mergeTrees(head, merge, common, branch1Name, branch2Name):
162
# Low level file merging, update and removal
163
# ------------------------------------------
164
165
-MERGE_NONE = 0
166
-MERGE_TRIVIAL = 1
167
-MERGE_3WAY = 2
165
def mergeFile(oPath, oSha, oMode, aPath, aSha, aMode, bPath, bSha, bMode,
166
branch1Name, branch2Name):
167
171
- merge = MERGE_NONE
168
+ merge = False
169
clean = True
170
171
if stat.S_IFMT(aMode) != stat.S_IFMT(bMode):
@@ -181,7 +178,7 @@ def mergeFile(oPath, oSha, oMode, aPath, aSha, aMode, bPath, bSha, bMode,
178
sha = bSha
179
else:
180
if aSha != oSha and bSha != oSha:
184
- merge = MERGE_TRIVIAL
181
+ merge = True
182
183
if aMode == oMode:
184
mode = bMode
@@ -211,7 +208,6 @@ def mergeFile(oPath, oSha, oMode, aPath, aSha, aMode, bPath, bSha, bMode,
208
os.unlink(src1)
209
os.unlink(src2)
210
214
- merge = MERGE_3WAY
211
clean = (code == 0)
212
else:
213
assert(stat.S_ISLNK(aMode) and stat.S_ISLNK(bMode))
@@ -590,7 +586,7 @@ def processRenames(renamesA, renamesB, branchNameA, branchNameB):
586
if merge or not clean:
587
print 'Renaming', fmtRename(path, ren1.dstName)
588
593
- if merge == MERGE_3WAY:
589
+ if merge:
590
print 'Auto-merging', ren1.dstName
591
592
if not clean:
@@ -668,7 +664,7 @@ def processRenames(renamesA, renamesB, branchNameA, branchNameB):
664
if merge or not clean:
665
print 'Renaming', fmtRename(ren1.srcName, ren1.dstName)
666
671
- if merge == MERGE_3WAY:
667
+ if merge:
668
print 'Auto-merging', ren1.dstName
669
670
if not clean: