@matheusbsbs / matheus-bagliano / commits / 6e9e0327b7
Fork 0

git-am: catch missing author date early.

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>

Junio C Hamano committed Dec 2, 2007 at 14:38 UTC 6e9e0327b7d7f384d8a223b4bc40330ef3e7fb61
1 file changed +2 -2
git-am.sh
+2 -2
@@ -307,9 +307,9 @@ do
307 GIT_AUTHOR_EMAIL="$(sed -n '/^Email/ s/Email: //p' "$dotest/info")"
308 GIT_AUTHOR_DATE="$(sed -n '/^Date/ s/Date: //p' "$dotest/info")"
309
310 - if test -z "$GIT_AUTHOR_EMAIL"
310 + if test -z "$GIT_AUTHOR_EMAIL" || test -z "$GIT_AUTHOR_DATE"
311 then
312 - echo "Patch does not have a valid e-mail address."
312 + echo "Patch does not have valid authorship information."
313 stop_here $this
314 fi
315