summaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2010-01-14 06:54:52 +0100
committerJunio C Hamano <gitster@pobox.com>2010-01-14 00:27:56 -0800
commit5c5d059a0d8d2b0341077f7468dd480352775e1c (patch)
tree520201ece48955a1eb238e320b6fabec81add726 /git-rebase--interactive.sh
parentee0a4afbe2baeec2bfdf3d8e7abc77f24294298d (diff)
downloadgit-5c5d059a0d8d2b0341077f7468dd480352775e1c.tar.gz
rebase -i: Handle the author script all in one place in do_next
This change has no practical effect but makes the code easier to follow. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--interactive.sh')
-rwxr-xr-xgit-rebase--interactive.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 1499a67bba..122ba314d6 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -447,6 +447,8 @@ do_next () {
make_squash_message $squash_style $sha1 > "$MSG"
failed=f
author_script=$(get_author_ident_from_commit HEAD)
+ echo "$author_script" > "$AUTHOR_SCRIPT"
+ eval "$author_script"
output git reset --soft HEAD^
pick_one -n $sha1 || failed=t
case "$(peek_next_command)" in
@@ -465,11 +467,9 @@ do_next () {
rm -f "$GIT_DIR"/MERGE_MSG || exit
;;
esac
- echo "$author_script" > "$AUTHOR_SCRIPT"
if test $failed = f
then
# This is like --amend, but with a different message
- eval "$author_script"
GIT_AUTHOR_NAME="$GIT_AUTHOR_NAME" \
GIT_AUTHOR_EMAIL="$GIT_AUTHOR_EMAIL" \
GIT_AUTHOR_DATE="$GIT_AUTHOR_DATE" \