From: David Barr Date: Mon, 08 Aug 2011 05:10:42 GMT Subject: RE: [PATCH v2] am: ignore leading whitespace before patch Message-ID: <1312780242-91659-1-git-send-email-davidbarr@google.com> In-Reply-To: <20110808024904.GF19551@elie.gateway.2wire.net> Add a test for GMail-style padded email files. Signed-off-by: David Barr --- t/t4150-am.sh | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/t/t4150-am.sh b/t/t4150-am.sh index 151404e..40a5a3e 100755 --- a/t/t4150-am.sh +++ b/t/t4150-am.sh @@ -167,6 +167,17 @@ test_expect_success 'am applies patch e-mail not in a mbox with CRLF' ' test "$(git rev-parse second^)" = "$(git rev-parse HEAD^)" ' +test_expect_success 'am applies patch e-mail with preceding whitespace' ' + rm -fr .git/rebase-apply && + git reset --hard && + git checkout first && + printf "%256s\\n" "" >patch1-ws.eml && + cat patch1.eml >>patch1-ws.eml && + git am output.out 2>&1 && + ! test -d .git/rebase-apply && + git diff --exit-code second +' + test_expect_success 'setup: new author and committer' ' GIT_AUTHOR_NAME="Another Thor" && GIT_AUTHOR_EMAIL="a.thor@example.com" && -- 1.7.6