diff options
Diffstat (limited to 't/t6010-merge-base.sh')
-rwxr-xr-x | t/t6010-merge-base.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/t/t6010-merge-base.sh b/t/t6010-merge-base.sh index e0c5f44cac..44c726ea39 100755 --- a/t/t6010-merge-base.sh +++ b/t/t6010-merge-base.sh @@ -34,7 +34,7 @@ doit () { commit=$(echo $NAME | git commit-tree $T $PARENTS) && - echo $commit >.git/refs/tags/$NAME && + git update-ref "refs/tags/$NAME" "$commit" && echo $commit } @@ -245,7 +245,7 @@ test_expect_success 'using reflog to find the fork point' ' git commit --allow-empty -m "Derived #$count" && git rev-parse HEAD >derived$count && git checkout -B base $E || exit 1 - done + done && for count in 1 2 3 do @@ -260,6 +260,12 @@ test_expect_success 'using reflog to find the fork point' ' test_cmp expect3 actual ' +test_expect_success '--fork-point works with empty reflog' ' + git -c core.logallrefupdates=false branch no-reflog base && + git merge-base --fork-point no-reflog derived && + test_cmp expect3 actual +' + test_expect_success 'merge-base --octopus --all for complex tree' ' # Best common ancestor for JE, JAA and JDD is JC # JE |