X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-rebase--interactive.sh;h=3e4fd1456f1ebb4aabb61de6d7f13f820ae2abdc;hb=2be10bb5c1cfe15aa4f1b43137ccd17d826d8553;hp=c2f6089de8dd74f9740d0ca4c5225248ec1bc1e7;hpb=78bc024ab075f4d5d9cc0b6540b538f3d93d04cb;p=git.git diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index c2f6089de..3e4fd1456 100755 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -215,10 +215,10 @@ has_action () { # Run command with GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, and # GIT_AUTHOR_DATE exported from the current environment. do_with_author () { - GIT_AUTHOR_NAME="$GIT_AUTHOR_NAME" \ - GIT_AUTHOR_EMAIL="$GIT_AUTHOR_EMAIL" \ - GIT_AUTHOR_DATE="$GIT_AUTHOR_DATE" \ - "$@" + ( + export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE + "$@" + ) } pick_one () { @@ -378,7 +378,7 @@ update_squash_messages () { sed -e 1d -e '2,/^./{ /^$/d }' <"$SQUASH_MSG".bak - } >$SQUASH_MSG + } >"$SQUASH_MSG" else commit_message HEAD > "$FIXUP_MSG" || die "Cannot write $FIXUP_MSG" COUNT=2 @@ -387,7 +387,7 @@ update_squash_messages () { echo "# The first commit's message is:" echo cat "$FIXUP_MSG" - } >$SQUASH_MSG + } >"$SQUASH_MSG" fi case $1 in squash) @@ -403,11 +403,11 @@ update_squash_messages () { echo commit_message $2 | sed -e 's/^/# /' ;; - esac >>$SQUASH_MSG + esac >>"$SQUASH_MSG" } peek_next_command () { - sed -n -e "/^#/d" -e "/^$/d" -e "s/ .*//p" -e "q" < "$TODO" + sed -n -e "/^#/d" -e '/^$/d' -e "s/ .*//p" -e "q" < "$TODO" } # A squash/fixup has failed. Prepare the long version of the squash