summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-10-06 19:11:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-10-06 19:11:20 (GMT)
commit4ac9aeb2b217090b750773cf87be361b88b253a6 (patch)
tree1ba99808b195a9042d4de44cf33f0ba0d019d7f9 /t
parent90d6bd5ed3bd5de7be037abace4afa065fb2207b (diff)
parent6355e505bacf0a12a5de77bcd0c1198e74ad340b (diff)
downloadgit-4ac9aeb2b217090b750773cf87be361b88b253a6.zip
git-4ac9aeb2b217090b750773cf87be361b88b253a6.tar.gz
git-4ac9aeb2b217090b750773cf87be361b88b253a6.tar.bz2
Merge branch 'bc/fix-cherry-pick-root'
* bc/fix-cherry-pick-root: builtin/revert.c: don't dereference a NULL pointer
Diffstat (limited to 't')
-rwxr-xr-xt/t3506-cherry-pick-ff.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t3506-cherry-pick-ff.sh b/t/t3506-cherry-pick-ff.sh
index e17ae71..51ca391 100755
--- a/t/t3506-cherry-pick-ff.sh
+++ b/t/t3506-cherry-pick-ff.sh
@@ -95,4 +95,14 @@ test_expect_success 'cherry pick a merge relative to nonexistent parent with --f
test_must_fail git cherry-pick --ff -m 3 C
'
+test_expect_success 'cherry pick a root commit with --ff' '
+ git reset --hard first -- &&
+ git rm file1 &&
+ echo first >file2 &&
+ git add file2 &&
+ git commit --amend -m "file2" &&
+ git cherry-pick --ff first &&
+ test "$(git rev-parse --verify HEAD)" = "1df192cd8bc58a2b275d842cede4d221ad9000d1"
+'
+
test_done