summaryrefslogtreecommitdiff
path: root/git-commit.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-07-02 01:45:47 -0700
committerJunio C Hamano <gitster@pobox.com>2007-07-02 01:45:47 -0700
commitf36db549057f09dd390d712fa2d72dd2599feba6 (patch)
tree3f58a55fe4761614cf358090cd57ac5037302fd0 /git-commit.sh
parente1bc8dc66dd5a2ef8b23c6b7cac8164d85e73307 (diff)
parentf09c9b8c5ff9d8a15499b09ccd6c3e7b3c76af77 (diff)
downloadgit-f36db549057f09dd390d712fa2d72dd2599feba6.tar.gz
Merge branch 'js/rebase'
* js/rebase: Teach rebase -i about --preserve-merges rebase -i: provide reasonable reflog for the rebased branch rebase -i: several cleanups ignore git-rebase--interactive Teach rebase an interactive mode Move the pick_author code to git-sh-setup
Diffstat (limited to 'git-commit.sh')
-rwxr-xr-xgit-commit.sh30
1 files changed, 2 insertions, 28 deletions
diff --git a/git-commit.sh b/git-commit.sh
index 5547a02954..d43bdd87c0 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -483,34 +483,8 @@ fi >>"$GIT_DIR"/COMMIT_EDITMSG
# Author
if test '' != "$use_commit"
then
- pick_author_script='
- /^author /{
- s/'\''/'\''\\'\'\''/g
- h
- s/^author \([^<]*\) <[^>]*> .*$/\1/
- s/'\''/'\''\'\'\''/g
- s/.*/GIT_AUTHOR_NAME='\''&'\''/p
-
- g
- s/^author [^<]* <\([^>]*\)> .*$/\1/
- s/'\''/'\''\'\'\''/g
- s/.*/GIT_AUTHOR_EMAIL='\''&'\''/p
-
- g
- s/^author [^<]* <[^>]*> \(.*\)$/\1/
- s/'\''/'\''\'\'\''/g
- s/.*/GIT_AUTHOR_DATE='\''&'\''/p
-
- q
- }
- '
- encoding=$(git config i18n.commitencoding || echo UTF-8)
- set_author_env=`git show -s --pretty=raw --encoding="$encoding" "$use_commit" |
- LANG=C LC_ALL=C sed -ne "$pick_author_script"`
- eval "$set_author_env"
- export GIT_AUTHOR_NAME
- export GIT_AUTHOR_EMAIL
- export GIT_AUTHOR_DATE
+ eval "$(get_author_ident_from_commit "$use_commit")"
+ export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE
fi
if test '' != "$force_author"
then