Fix typo in comment in builtin-add.c
[gitweb.git] / t / t6026-merge-attr.sh
index 1732b60ed8be3c8bd8ea39afc62205db4fccc228..1ba0a252230a283a6bb2463d98537aab1eaf4fb8 100755 (executable)
@@ -98,15 +98,17 @@ test_expect_success 'custom merge backend' '
 
        git reset --hard anchor &&
        git config --replace-all \
-       merge.driver "custom ./custom-merge %O %A %B 0" &&
+       merge.custom.driver "./custom-merge %O %A %B 0" &&
+       git config --replace-all \
+       merge.custom.name "custom merge driver for testing" &&
 
        git merge master &&
 
        cmp binary union &&
        sed -e 1,3d text >check-1 &&
-       o=$(git-unpack-file master^:text) &&
-       a=$(git-unpack-file side^:text) &&
-       b=$(git-unpack-file master:text) &&
+       o=$(git unpack-file master^:text) &&
+       a=$(git unpack-file side^:text) &&
+       b=$(git unpack-file master:text) &&
        sh -c "./custom-merge $o $a $b 0" &&
        sed -e 1,3d $a >check-2 &&
        cmp check-1 check-2 &&
@@ -117,7 +119,9 @@ test_expect_success 'custom merge backend' '
 
        git reset --hard anchor &&
        git config --replace-all \
-       merge.driver "custom ./custom-merge %O %A %B 1" &&
+       merge.custom.driver "./custom-merge %O %A %B 1" &&
+       git config --replace-all \
+       merge.custom.name "custom merge driver for testing" &&
 
        if git merge master
        then
@@ -129,13 +133,35 @@ test_expect_success 'custom merge backend' '
 
        cmp binary union &&
        sed -e 1,3d text >check-1 &&
-       o=$(git-unpack-file master^:text) &&
-       a=$(git-unpack-file anchor:text) &&
-       b=$(git-unpack-file master:text) &&
+       o=$(git unpack-file master^:text) &&
+       a=$(git unpack-file anchor:text) &&
+       b=$(git unpack-file master:text) &&
        sh -c "./custom-merge $o $a $b 0" &&
        sed -e 1,3d $a >check-2 &&
        cmp check-1 check-2 &&
        rm -f $o $a $b
 '
 
+test_expect_success 'up-to-date merge without common ancestor' '
+       test_create_repo repo1 &&
+       test_create_repo repo2 &&
+       test_tick &&
+       (
+               cd repo1 &&
+               >a &&
+               git add a &&
+               git commit -m initial
+       ) &&
+       test_tick &&
+       (
+               cd repo2 &&
+               git commit --allow-empty -m initial
+       ) &&
+       test_tick &&
+       (
+               cd repo1 &&
+               git pull ../repo2 master
+       )
+'
+
 test_done