git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
 
Previous: Junio C Hamano
Message 18 of 18 in “Corrupted (?) commit 6e6db85e confusing gitk”
  1. Steffen ProhaskaDec 2, 2007
  2. Wincent ColaiutaDec 2, 2007
  3. gitk: Add workaround to handle corrupted author dateSteffen Prohaska, Dec 2, 2007
  4. Junio C HamanoDec 2, 2007
  5. Brian DowningDec 2, 2007
  6. Linus TorvaldsDec 2, 2007
  7. Junio C HamanoDec 2, 2007
  8. Linus TorvaldsDec 2, 2007
  9. Junio C HamanoDec 2, 2007
  10. Linus TorvaldsDec 2, 2007
  11. Fix --signoff in builtin-commit differently.Junio C Hamano, Dec 2, 2007
  12. Johannes SchindelinDec 2, 2007
  13. Michael GebetsroitherDec 2, 2007
  14. Junio C HamanoDec 2, 2007
  15. Johannes SchindelinDec 2, 2007
  16. Linus TorvaldsDec 2, 2007
  17. Junio C HamanoDec 2, 2007
  18. Junio C HamanoDec 2, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.