summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e31bb3b)
raw | patch | inline | side by side (parent: e31bb3b)
author | Junio C Hamano <junkio@cox.net> | |
Mon, 15 Aug 2005 22:37:37 +0000 (15:37 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 15 Aug 2005 23:32:58 +0000 (16:32 -0700) |
The recent change to give the multiple commit message source was not
carrying over the authorship information from -C/-c commits correctly.
The export of the environment variable happens only in the subprocess,
not the main process that eventually runs git-commit-tree.
The right fix might be to teach git-commit-script to grok the From:
and Date: lines at the beginning of the commit message just like
git-applymbox knows how, but this has to do until that enhancement
happens.
Signed-off-by: Junio C Hamano <junkio@cox.net>
carrying over the authorship information from -C/-c commits correctly.
The export of the environment variable happens only in the subprocess,
not the main process that eventually runs git-commit-tree.
The right fix might be to teach git-commit-script to grok the From:
and Date: lines at the beginning of the commit message just like
git-applymbox knows how, but this has to do until that enhancement
happens.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-commit-script | patch | blob | history |
diff --git a/git-commit-script b/git-commit-script
index 5e6b877d1bf666572edf526a92ac7e94856c9193..790f07c08fc3aa893485fa3d252ce1fcb951d0fe 100755 (executable)
--- a/git-commit-script
+++ b/git-commit-script
no_edit=
else
if [ -f "$GIT_DIR/MERGE_HEAD" ]; then
+ {
echo "#"
echo "# It looks like your may be committing a MERGE."
echo "# If this is not correct, please remove the file"
no_edit=
esac
echo "#"
+ } |
+ git-stripspace >.editmsg
PARENTS="-p HEAD -p MERGE_HEAD"
elif test "$log_message" != ''
then
- echo "$log_message"
+ echo "$log_message" |
+ git-stripspace >.editmsg
elif test "$logfile" != ""
then
if test "$logfile" = -
cat
else
cat <"$logfile"
- fi
+ fi |
+ git-stripspace >.editmsg
elif test "$use_commit" != ""
then
pick_author_script='
export GIT_AUTHOR_EMAIL
export GIT_AUTHOR_DATE
git-cat-file commit "$use_commit" |
- sed -e '1,/^$/d'
- fi |
- git-stripspace >.editmsg
+ sed -e '1,/^$/d' |
+ git-stripspace >.editmsg
+ fi
+
case "$signoff" in
t)
git-var GIT_COMMITTER_IDENT | sed -e '