aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-08-10 22:16:42 -0700
committerJunio C Hamano <gitster@pobox.com>2009-08-10 22:16:42 -0700
commit38a9f35d1f7d2d90dafbbf4c45ac9500260eaeb0 (patch)
treeb24682291118c45ff0281d1e68a6e2d7b4dad521 /t
parentefd3f9fdbcc1f4fc8b423dfa4e73f11a18d0500f (diff)
parent46caf5053f0a784911c66530928e6e4361a783f2 (diff)
downloadgit-38a9f35d1f7d2d90dafbbf4c45ac9500260eaeb0.tar.gz
git-38a9f35d1f7d2d90dafbbf4c45ac9500260eaeb0.tar.xz
Merge branch 'ns/am-raw-email'
* ns/am-raw-email: git-am: print fair error message when format detection fails am: allow individual e-mail files as input
Diffstat (limited to 't')
-rwxr-xr-xt/t4150-am.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t4150-am.sh b/t/t4150-am.sh
index a12bf8462..829660523 100755
--- a/t/t4150-am.sh
+++ b/t/t4150-am.sh
@@ -77,6 +77,12 @@ test_expect_success setup '
git commit -s -F msg &&
git tag second &&
git format-patch --stdout first >patch1 &&
+ {
+ echo "X-Fake-Field: Line One" &&
+ echo "X-Fake-Field: Line Two" &&
+ echo "X-Fake-Field: Line Three" &&
+ git format-patch --stdout first | sed -e "1d"
+ } > patch1.eml &&
sed -n -e "3,\$p" msg >file &&
git add file &&
test_tick &&
@@ -108,6 +114,15 @@ test_expect_success 'am applies patch correctly' '
test "$(git rev-parse second^)" = "$(git rev-parse HEAD^)"
'
+test_expect_success 'am applies patch e-mail not in a mbox' '
+ git checkout first &&
+ git am patch1.eml &&
+ ! test -d .git/rebase-apply &&
+ test -z "$(git diff second)" &&
+ test "$(git rev-parse second)" = "$(git rev-parse HEAD)" &&
+ test "$(git rev-parse second^)" = "$(git rev-parse HEAD^)"
+'
+
GIT_AUTHOR_NAME="Another Thor"
GIT_AUTHOR_EMAIL="a.thor@example.com"
GIT_COMMITTER_NAME="Co M Miter"