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

Re: "git revert" (Re: pci_update_resource() getting called on sparc64)

From
Junio C Hamano <junkio@cox.net>
Date
Aug 8, 2005, 21:23 UTC
Message-ID
<7voe882kds.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.58.0508081357020.3258@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
Show 7 quoted lines
> On Mon, 8 Aug 2005, Junio C Hamano wrote:
>> 
>> Totally untested.  I acquired your habit of coding in my e-mail
>> client ;-).
>
> Looks good. Although I also have this advanced testing habit of just 
> reading the email and if it looks sane it tested out ok ;)

Heh, I immediately spotted two bugs after I sent it out, one mine, another yours.

 * dereferencing potential tag to get to the underlying commit
   was a good idea of mine, poorly executed.  It should
   rev-parse $rev^0, not $commit^0.
 * git commit does not take commit message from stdin.  I think
   we should do something like this:
diff --git a/git-commit-script b/git-commit-script
--- a/git-commit-script
+++ b/git-commit-script
@@ -92,11 +92,13 @@ then
 	rm .editmsg
 	exit 1
 fi
-case "$use_commit" in
-'')
+if test -t 0 && "$use_commit" = ""
+then
 	${VISUAL:-${EDITOR:-vi}} .editmsg
-	;;
-esac
+else
+	echo >&2 "(reading commit message from standard input)"
+	cat >.editmsg
+fi
 grep -v '^#' < .editmsg | git-stripspace > .cmitmsg
 [ -s .cmitmsg ] && 
 	tree=$(git-write-tree) &&
Previous: Linus TorvaldsNext: Johannes Schindelin
Message 4 of 12 in “"git revert" (Re: pci_update_resource() getting called on sparc64)”
  1. Linus TorvaldsAug 8, 2005
  2. Junio C HamanoAug 8, 2005
  3. Linus TorvaldsAug 8, 2005
  4. Junio C HamanoAug 8, 2005
  5. git-commit-script, was Re: "git revert" (Re: pci_update_resource() getting called on sparc64)Johannes Schindelin, Aug 8, 2005
  6. Junio C HamanoAug 8, 2005
  7. Linus TorvaldsAug 8, 2005
  8. Junio C HamanoAug 8, 2005
  9. Linus TorvaldsAug 8, 2005
  10. Junio C HamanoAug 8, 2005
  11. Johannes SchindelinAug 9, 2005
  12. Johannes SchindelinAug 9, 2005

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.