git fetch . left &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
- git diff actual expected
+ test_cmp expected actual
'
-cat >expected <<\EOF
-Merge branch 'left' of ../trash
+cat >expected <<EOF
+Merge branch 'left' of ../$test
EOF
test_expect_success 'merge-msg test #2' '
git checkout master &&
- git fetch ../trash left &&
+ git fetch ../"$test" left &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
- git diff actual expected
+ test_cmp expected actual
'
cat >expected <<\EOF
Common #1
EOF
-test_expect_success 'merge-msg test #3' '
+test_expect_success 'merge-msg test #3-1' '
+
+ git config --unset-all merge.log
+ git config --unset-all merge.summary
+ git config merge.log true &&
+
+ git checkout master &&
+ setdate &&
+ git fetch . left &&
+
+ git fmt-merge-msg <.git/FETCH_HEAD >actual &&
+ test_cmp expected actual
+'
+test_expect_success 'merge-msg test #3-2' '
+
+ git config --unset-all merge.log
+ git config --unset-all merge.summary
git config merge.summary true &&
git checkout master &&
git fetch . left &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
- git diff actual expected
+ test_cmp expected actual
'
cat >expected <<\EOF
Common #1
EOF
-test_expect_success 'merge-msg test #4' '
+test_expect_success 'merge-msg test #4-1' '
+
+ git config --unset-all merge.log
+ git config --unset-all merge.summary
+ git config merge.log true &&
+
+ git checkout master &&
+ setdate &&
+ git fetch . left right &&
+
+ git fmt-merge-msg <.git/FETCH_HEAD >actual &&
+ test_cmp expected actual
+'
+test_expect_success 'merge-msg test #4-2' '
+
+ git config --unset-all merge.log
+ git config --unset-all merge.summary
git config merge.summary true &&
git checkout master &&
git fetch . left right &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
- git diff actual expected
+ test_cmp expected actual
+'
+
+test_expect_success 'merge-msg test #5-1' '
+
+ git config --unset-all merge.log
+ git config --unset-all merge.summary
+ git config merge.log yes &&
+
+ git checkout master &&
+ setdate &&
+ git fetch . left right &&
+
+ git fmt-merge-msg <.git/FETCH_HEAD >actual &&
+ test_cmp expected actual
'
-test_expect_success 'merge-msg test #5' '
+test_expect_success 'merge-msg test #5-2' '
+ git config --unset-all merge.log
+ git config --unset-all merge.summary
git config merge.summary yes &&
git checkout master &&
git fetch . left right &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
- git diff actual expected
+ test_cmp expected actual
'
test_done