summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5e207b4)
raw | patch | inline | side by side (parent: 5e207b4)
author | Junio C Hamano <junio@kernel.org> | |
Mon, 22 Jan 2007 21:03:31 +0000 (13:03 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 23 Jan 2007 03:40:57 +0000 (19:40 -0800) |
Earlier code discarded GIT_AUTHOR_DATE taken from the base
commit when --author was specified. This was often wrong as
that use is likely to fix the spelling of author's name.
Signed-off-by: Junio C Hamano <junkio@cox.net>
commit when --author was specified. This was often wrong as
that use is likely to fix the spelling of author's name.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-commit.sh | patch | blob | history |
diff --git a/git-commit.sh b/git-commit.sh
index e23918cd6c515e193d3bc5d476c360001fdc1222..6f4dcdbcccd4355a01218db7de3081e91bba102c 100755 (executable)
--- a/git-commit.sh
+++ b/git-commit.sh
fi >>"$GIT_DIR"/COMMIT_EDITMSG
# Author
-if test '' != "$force_author"
-then
- GIT_AUTHOR_NAME=`expr "z$force_author" : 'z\(.*[^ ]\) *<.*'` &&
- GIT_AUTHOR_EMAIL=`expr "z$force_author" : '.*\(<.*\)'` &&
- test '' != "$GIT_AUTHOR_NAME" &&
- test '' != "$GIT_AUTHOR_EMAIL" ||
- die "malformed --author parameter"
- export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL
-elif test '' != "$use_commit"
+if test '' != "$use_commit"
then
pick_author_script='
/^author /{
export GIT_AUTHOR_EMAIL
export GIT_AUTHOR_DATE
fi
+if test '' != "$force_author"
+then
+ GIT_AUTHOR_NAME=`expr "z$force_author" : 'z\(.*[^ ]\) *<.*'` &&
+ GIT_AUTHOR_EMAIL=`expr "z$force_author" : '.*\(<.*\)'` &&
+ test '' != "$GIT_AUTHOR_NAME" &&
+ test '' != "$GIT_AUTHOR_EMAIL" ||
+ die "malformed --author parameter"
+ export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL
+fi
PARENTS="-p HEAD"
if test -z "$initial_commit"