author | Junio C Hamano <gitster@pobox.com> | |
Sun, 19 Oct 2008 23:06:21 +0000 (16:06 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 19 Oct 2008 23:06:21 +0000 (16:06 -0700) |
* mv/merge-noff:
builtin-commit: use reduce_heads() only when appropriate
Conflicts:
builtin-commit.c
t/t7600-merge.sh
builtin-commit: use reduce_heads() only when appropriate
Conflicts:
builtin-commit.c
t/t7600-merge.sh
1 | 2 | |||
---|---|---|---|---|
builtin-commit.c | patch | | diff1 | | diff2 | | blob | history |
builtin-merge.c | patch | | diff1 | | diff2 | | blob | history |
t/t7600-merge.sh | patch | | diff1 | | diff2 | | blob | history |
diff --cc builtin-commit.c
Simple merge
diff --cc builtin-merge.c
Simple merge
diff --cc t/t7600-merge.sh
index 3a36a95b9ac42b35e680109df4daf87fc219fb53,209d7cd4b8f9497cef160a1a1b11f93cb7347c8f..e5b210bc960c8433d6758f3932a86647208297ef
--- 1/t/t7600-merge.sh
--- 2/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
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
+
+test_expect_success 'merge early part of c2' '
+ git reset --hard c3 &&
+ echo c4 > c4.c &&
+ git add c4.c &&
+ git commit -m c4 &&
+ git tag c4 &&
+ echo c5 > c5.c &&
+ git add c5.c &&
+ git commit -m c5 &&
+ git tag c5 &&
+ git reset --hard c3 &&
+ echo c6 > c6.c &&
+ git add c6.c &&
+ git commit -m c6 &&
+ git tag c6 &&
+ git merge c5~1 &&
+ git show -s --pretty=format:%s HEAD > actual &&
+ test_cmp actual expected
+'
+
+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