index 93289c050a49c0d5074659fc770683fd01bfbcba..061cd0a69e22a51a73488b89ffb99a934fd58ce1 100755 (executable)
require_work_tree
DOTEST="$GIT_DIR/.dotest-merge"
-TODO="$DOTEST"/todo
+TODO="$DOTEST"/git-rebase-todo
DONE="$DOTEST"/done
MSG="$DOTEST"/message
SQUASH_MSG="$DOTEST"/message-squash
case "$(peek_next_command)" in
squash)
EDIT_COMMIT=
+ USE_OUTPUT=output
cp "$MSG" "$SQUASH_MSG"
;;
*)
EDIT_COMMIT=-e
+ USE_OUTPUT=
test -f "$SQUASH_MSG" && rm "$SQUASH_MSG"
esac
failed=f
- pick_one -n $sha1 || failed=t
output git reset --soft HEAD^
+ pick_one -n $sha1 || failed=t
author_script=$(get_author_ident_from_commit $sha1)
echo "$author_script" > "$DOTEST"/author-script
case $failed in
# This is like --amend, but with a different message
eval "$author_script"
export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE
- output git commit -F "$MSG" $EDIT_COMMIT
+ $USE_OUTPUT git commit -F "$MSG" $EDIT_COMMIT
;;
t)
cp "$MSG" "$GIT_DIR"/MERGE_MSG