aboutsummaryrefslogtreecommitdiff
path: root/git-commit-script
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-08-15 15:37:37 -0700
committerJunio C Hamano <junkio@cox.net>2005-08-15 16:32:58 -0700
commit2150cc99fe29fd81db1e9c5971e13bcb78373ebf (patch)
tree7008b96cd7acee96be7ff4014b623c074f122446 /git-commit-script
parente31bb3bb939a8feb7af472c55d95f41a90bbc438 (diff)
downloadgit-2150cc99fe29fd81db1e9c5971e13bcb78373ebf.tar.gz
git-2150cc99fe29fd81db1e9c5971e13bcb78373ebf.tar.xz
Tentative fix to git-commit-script
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>
Diffstat (limited to 'git-commit-script')
-rwxr-xr-xgit-commit-script16
1 files changed, 11 insertions, 5 deletions
diff --git a/git-commit-script b/git-commit-script
index 5e6b877d1..790f07c08 100755
--- a/git-commit-script
+++ b/git-commit-script
@@ -167,6 +167,7 @@ if [ ! -r "$GIT_DIR/HEAD" ]; then
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"
@@ -177,10 +178,13 @@ else
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" = -
@@ -190,7 +194,8 @@ else
cat
else
cat <"$logfile"
- fi
+ fi |
+ git-stripspace >.editmsg
elif test "$use_commit" != ""
then
pick_author_script='
@@ -220,9 +225,10 @@ else
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 '