]> asedeno.scripts.mit.edu Git - git.git/commitdiff
git-am: catch missing author date early.
authorJunio C Hamano <gitster@pobox.com>
Sun, 2 Dec 2007 22:38:40 +0000 (14:38 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sun, 2 Dec 2007 22:38:40 +0000 (14:38 -0800)
Even though commit-tree would default to the current time if the incoming
e-mail message somehow did not record the timestamp, it is safer to catch
the breakage sooner.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-am.sh

index 76c1c844a95d8af19f64a3278706daf907dace01..2e407084260350e7fa56987a7603afdcd00acfb5 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
@@ -307,9 +307,9 @@ do
        GIT_AUTHOR_EMAIL="$(sed -n '/^Email/ s/Email: //p' "$dotest/info")"
        GIT_AUTHOR_DATE="$(sed -n '/^Date/ s/Date: //p' "$dotest/info")"
 
-       if test -z "$GIT_AUTHOR_EMAIL"
+       if test -z "$GIT_AUTHOR_EMAIL" || test -z "$GIT_AUTHOR_DATE"
        then
-               echo "Patch does not have a valid e-mail address."
+               echo "Patch does not have valid authorship information."
                stop_here $this
        fi