Skip to content

Commit

Permalink
merge-recursive: Fix limited output of rename messages
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fredrik Kuivinen authored and Junio C Hamano committed Nov 9, 2005
1 parent e09f5d7 commit c8a4f5e
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions git-merge-recursive.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,10 @@ def mergeTrees(head, merge, common, branch1Name, branch2Name):
# Low level file merging, update and removal
# ------------------------------------------

MERGE_NONE = 0
MERGE_TRIVIAL = 1
MERGE_3WAY = 2
def mergeFile(oPath, oSha, oMode, aPath, aSha, aMode, bPath, bSha, bMode,
branch1Name, branch2Name):

merge = MERGE_NONE
merge = False
clean = True

if stat.S_IFMT(aMode) != stat.S_IFMT(bMode):
Expand All @@ -181,7 +178,7 @@ def mergeFile(oPath, oSha, oMode, aPath, aSha, aMode, bPath, bSha, bMode,
sha = bSha
else:
if aSha != oSha and bSha != oSha:
merge = MERGE_TRIVIAL
merge = True

if aMode == oMode:
mode = bMode
Expand Down Expand Up @@ -211,7 +208,6 @@ def mergeFile(oPath, oSha, oMode, aPath, aSha, aMode, bPath, bSha, bMode,
os.unlink(src1)
os.unlink(src2)

merge = MERGE_3WAY
clean = (code == 0)
else:
assert(stat.S_ISLNK(aMode) and stat.S_ISLNK(bMode))
Expand Down Expand Up @@ -590,7 +586,7 @@ def processRenames(renamesA, renamesB, branchNameA, branchNameB):
if merge or not clean:
print 'Renaming', fmtRename(path, ren1.dstName)

if merge == MERGE_3WAY:
if merge:
print 'Auto-merging', ren1.dstName

if not clean:
Expand Down Expand Up @@ -668,7 +664,7 @@ def processRenames(renamesA, renamesB, branchNameA, branchNameB):
if merge or not clean:
print 'Renaming', fmtRename(ren1.srcName, ren1.dstName)

if merge == MERGE_3WAY:
if merge:
print 'Auto-merging', ren1.dstName

if not clean:
Expand Down

0 comments on commit c8a4f5e

Please sign in to comment.