Code

Support 'push --dry-run' for http transport
[git.git] / git-rebase--interactive.sh
index 823291d4afbe8571882fd01a614e07dd0439d1c2..df4cedb8594ef795933bb02447d9a96815e2d64b 100755 (executable)
@@ -80,7 +80,7 @@ mark_action_done () {
 make_patch () {
        parent_sha1=$(git rev-parse --verify "$1"^) ||
                die "Cannot get patch for $1^"
-       git diff "$parent_sha1".."$1" > "$DOTEST"/patch
+       git diff-tree -p "$parent_sha1".."$1" > "$DOTEST"/patch
        test -f "$DOTEST"/message ||
                git cat-file commit "$1" | sed "1,/^$/d" > "$DOTEST"/message
        test -f "$DOTEST"/author-script ||
@@ -232,14 +232,14 @@ do_next () {
        '#'*|'')
                mark_action_done
                ;;
-       pick)
+       pick|p)
                comment_for_reflog pick
 
                mark_action_done
                pick_one $sha1 ||
                        die_with_patch $sha1 "Could not apply $sha1... $rest"
                ;;
-       edit)
+       edit|e)
                comment_for_reflog edit
 
                mark_action_done
@@ -254,7 +254,7 @@ do_next () {
                warn
                exit 0
                ;;
-       squash)
+       squash|s)
                comment_for_reflog squash
 
                has_action "$DONE" ||
@@ -263,7 +263,7 @@ do_next () {
                mark_action_done
                make_squash_message $sha1 > "$MSG"
                case "$(peek_next_command)" in
-               squash)
+               squash|s)
                        EDIT_COMMIT=
                        USE_OUTPUT=output
                        cp "$MSG" "$SQUASH_MSG"
@@ -276,9 +276,9 @@ do_next () {
                esac
 
                failed=f
+               author_script=$(get_author_ident_from_commit HEAD)
                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
                f)
@@ -325,7 +325,7 @@ do_next () {
                ;;
        esac && {
                test ! -f "$DOTEST"/verbose ||
-                       git diff --stat $(cat "$DOTEST"/head)..HEAD
+                       git diff-tree --stat $(cat "$DOTEST"/head)..HEAD
        } &&
        rm -rf "$DOTEST" &&
        git gc --auto &&