Code

Git archive and trailing "/" in prefix
[git.git] / t / t7600-merge.sh
index 5abce3119bb2d0c0379b28d40b4919b8b0de0171..e5b210bc960c8433d6758f3932a86647208297ef 100755 (executable)
@@ -230,6 +230,10 @@ test_expect_success 'test option parsing' '
        test_must_fail git merge
 '
 
+test_expect_success 'reject non-strategy with a git-merge-foo name' '
+       test_must_fail git merge -s index c1
+'
+
 test_expect_success 'merge c0 with c1' '
        git reset --hard c0 &&
        git merge c1 &&
@@ -507,6 +511,13 @@ test_expect_success 'in-index merge' '
 
 test_debug 'gitk --all'
 
+test_expect_success 'refresh the index before merging' '
+       git reset --hard c1 &&
+       sleep 1 &&
+       touch file &&
+       git merge c3
+'
+
 cat >expected <<EOF
 Merge branch 'c5' (early part)
 EOF
@@ -533,4 +544,20 @@ test_expect_success 'merge early part of c2' '
 
 test_debug 'gitk --all'
 
+test_expect_success 'merge --no-ff --no-commit && commit' '
+       git reset --hard c0 &&
+       git merge --no-ff --no-commit c1 &&
+       EDITOR=: git commit &&
+       verify_parents $c0 $c1
+'
+
+test_debug 'gitk --all'
+
+test_expect_success 'amending no-ff merge commit' '
+       EDITOR=: git commit --amend &&
+       verify_parents $c0 $c1
+'
+
+test_debug 'gitk --all'
+
 test_done