summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fad2652)
raw | patch | inline | side by side (parent: fad2652)
author | Jeff King <peff@peff.net> | |
Thu, 12 May 2011 11:10:07 +0000 (07:10 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 16 May 2011 20:05:03 +0000 (13:05 -0700) |
We already tested cherry-picking a root commit, but only
with the internal merge-recursive strategy. Let's also test
the recently-allowed reverting of a root commit, as well as
testing with external strategies (which until recently
triggered a segfault).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
with the internal merge-recursive strategy. Let's also test
the recently-allowed reverting of a root commit, as well as
testing with external strategies (which until recently
triggered a segfault).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3503-cherry-pick-root.sh | patch | blob | history |
index b0faa299183df5fe06ccaf383bce47cbb9a0cf89..9aefe3a1becac200f2c29beee84fab278f9fcfa0 100755 (executable)
#!/bin/sh
-test_description='test cherry-picking a root commit'
+test_description='test cherry-picking (and reverting) a root commit'
. ./test-lib.sh
test_expect_success 'cherry-pick a root commit' '
git cherry-pick master &&
- test first = $(cat file1)
+ echo first >expect &&
+ test_cmp expect file1
+
+'
+
+test_expect_success 'revert a root commit' '
+
+ git revert master &&
+ test_path_is_missing file1
+
+'
+
+test_expect_success 'cherry-pick a root commit with an external strategy' '
+
+ git cherry-pick --strategy=resolve master &&
+ echo first >expect &&
+ test_cmp expect file1
+
+'
+
+test_expect_success 'revert a root commit with an external strategy' '
+
+ git revert --strategy=resolve master &&
+ test_path_is_missing file1
'