@matheusbsbs / matheus-bagliano / commits / 5c5d059a0d
Fork 0

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>

Michael Haggerty committed Jan 14, 2010 at 06:54 UTC 5c5d059a0d8d2b0341077f7468dd480352775e1c
1 file changed +2 -2
git-rebase--interactive.sh
+2 -2
@@ -447,6 +447,8 @@ do_next () {
447 make_squash_message $squash_style $sha1 > "$MSG"
448 failed=f
449 author_script=$(get_author_ident_from_commit HEAD)
450 + echo "$author_script" > "$AUTHOR_SCRIPT"
451 + eval "$author_script"
452 output git reset --soft HEAD^
453 pick_one -n $sha1 || failed=t
454 case "$(peek_next_command)" in
@@ -465,11 +467,9 @@ do_next () {
467 rm -f "$GIT_DIR"/MERGE_MSG || exit
468 ;;
469 esac
468 - echo "$author_script" > "$AUTHOR_SCRIPT"
470 if test $failed = f
471 then
472 # This is like --amend, but with a different message
472 - eval "$author_script"
473 GIT_AUTHOR_NAME="$GIT_AUTHOR_NAME" \
474 GIT_AUTHOR_EMAIL="$GIT_AUTHOR_EMAIL" \
475 GIT_AUTHOR_DATE="$GIT_AUTHOR_DATE" \