diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-04-17 21:42:12 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-04-17 21:42:12 -0700 |
commit | 1ee28e58d576bf15c1efce4b9a92df9b893b3bc0 (patch) | |
tree | 146c3b93761deb7e75b8629477a1ba9f77353c28 /t | |
parent | a9b772a0116869f0f93e57ca0b49fd66325bb04a (diff) | |
parent | f79d4c8a0f22d7fd25018be846c7e48127ed3200 (diff) | |
download | git-1ee28e58d576bf15c1efce4b9a92df9b893b3bc0.tar.gz git-1ee28e58d576bf15c1efce4b9a92df9b893b3bc0.tar.xz |
Merge branch 'ns/am-to-empty'
* ns/am-to-empty:
git-am: teach git-am to apply a patch to an unborn branch
Diffstat (limited to 't')
-rwxr-xr-x | t/t4150-am.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t4150-am.sh b/t/t4150-am.sh index 5e65afa0c..d6ebbaebe 100755 --- a/t/t4150-am.sh +++ b/t/t4150-am.sh @@ -290,4 +290,19 @@ test_expect_success 'am --ignore-date' ' echo "$at" | grep "+0000" ' +test_expect_success 'am into an unborn branch' ' + rm -fr subdir && + mkdir -p subdir && + git format-patch --numbered-files -o subdir -1 first && + ( + cd subdir && + git init && + git am 1 + ) && + result=$( + cd subdir && git rev-parse HEAD^{tree} + ) && + test "z$result" = "z$(git rev-parse first^{tree})" +' + test_done |