diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-06-24 16:02:28 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-06-24 18:08:40 +0200 |
commit | 55dcc17c331f580b3beeb4d5decf64d3baf94f2e (patch) | |
tree | 9b22eac76156f87e307ea33294791bc820fd3167 /test/git/test_fun.py | |
parent | 129f90aa8d83d9b250c87b0ba790605c4a2bb06a (diff) | |
download | gitpython-55dcc17c331f580b3beeb4d5decf64d3baf94f2e.tar.gz |
aggressive_tree_merge: fixed incorrect handling of one branch, it was just not implemented causing incorrect merge results. Added test to cover this issue
Diff: added NULL_BIN_SHA constant for completeness
Diffstat (limited to 'test/git/test_fun.py')
-rw-r--r-- | test/git/test_fun.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/git/test_fun.py b/test/git/test_fun.py index b2b94415..dad9fcda 100644 --- a/test/git/test_fun.py +++ b/test/git/test_fun.py @@ -114,6 +114,36 @@ class TestFun(TestBase): trees = [tb, th, tm] assert_entries(aggressive_tree_merge(odb, trees), 2) + # same file added in both, differently + fa = mkfile('1', shab) + th = mktree(odb, [fa]) + fb = mkfile('1', shac) + tm = mktree(odb, [fb]) + + # expect conflict + trees = [tb, th, tm] + assert_entries(aggressive_tree_merge(odb, trees), 2, True) + + # same file added, different mode + fa = mkfile('1', shab) + th = mktree(odb, [fa]) + fb = mkcommit('1', shab) + tm = mktree(odb, [fb]) + + # expect conflict + trees = [tb, th, tm] + assert_entries(aggressive_tree_merge(odb, trees), 2, True) + + # same file added in both + fa = mkfile('1', shab) + th = mktree(odb, [fa]) + fb = mkfile('1', shab) + tm = mktree(odb, [fb]) + + # expect conflict + trees = [tb, th, tm] + assert_entries(aggressive_tree_merge(odb, trees), 1) + # modify same base file, differently fa = mkfile(bfn, shab) th = mktree(odb, [fa]) |