Re: Corrupted (?) commit 6e6db85e confusing gitk
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 2, 2007, 22:14 UTC
- Message-ID
- <7vfxyku4kw.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <Pine.LNX.4.64.0712022132060.27959@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 6 quoted lines
>> With the above, something like: >> >> echo msg | GIT_AUTHOR_DATE='' git commit-tree sha1 > > Darn. But when can "GIT_AUTHOR_DATE" be set to the empty string? I mean, > I understand unset'ing it. But setting it to ""?
Maybe something like this would catch such a breakage earlier, but with the re-fix for --signoff I just sent to make fmt_ident() safer, I think this patch would fall into belt-and-suspender category.
---
git-am.sh | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/git-am.sh b/git-am.sh index 4126f0e..bab6f68 100755 --- a/git-am.sh +++ b/git-am.sh @@ -307,9 +307,11 @@ 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_NAME" || + test -z "$GIT_AUTHOR_DATE" then - echo "Patch does not have a valid e-mail address." + echo "Patch does not have a valid authorship information." stop_here $this fi