summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e09f5d7)
raw | patch | inline | side by side (parent: e09f5d7)
author | Fredrik Kuivinen <freku045@student.liu.se> | |
Wed, 9 Nov 2005 10:36:55 +0000 (11:36 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 9 Nov 2005 20:32:34 +0000 (12:32 -0800) |
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>
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-merge-recursive.py | patch | blob | history |
diff --git a/git-merge-recursive.py b/git-merge-recursive.py
index 9983cd9deec120ed376403a3830ad7ad48683516..36578754ce854fea5ceb457af3630e10f9be9754 100755 (executable)
--- a/git-merge-recursive.py
+++ b/git-merge-recursive.py
# 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):
sha = bSha
else:
if aSha != oSha and bSha != oSha:
- merge = MERGE_TRIVIAL
+ merge = True
if aMode == oMode:
mode = bMode
os.unlink(src1)
os.unlink(src2)
- merge = MERGE_3WAY
clean = (code == 0)
else:
assert(stat.S_ISLNK(aMode) and stat.S_ISLNK(bMode))
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:
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: