Linus Torvalds <[EMAIL PROTECTED]> writes:
> 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) &&
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html