Merge branch 'js/t3404-grammo-fix' into maint
[gitweb.git] / git-rebase--interactive.sh
index 655ebaa4717fe6e43b4b16a69e5eb282140edd6d..4f499d2c13e7a891aa46b23fcb27308b52b0d235 100644 (file)
@@ -192,7 +192,6 @@ make_patch () {
 die_with_patch () {
        echo "$1" > "$state_dir"/stopped-sha
        make_patch "$1"
-       git rerere
        die "$2"
 }
 
@@ -213,6 +212,7 @@ exit_with_patch () {
 }
 
 die_abort () {
+       apply_autostash
        rm -rf "$state_dir"
        die "$1"
 }
@@ -549,7 +549,8 @@ do_next () {
 
                mark_action_done
                do_pick $sha1 "$rest"
-               warn "Stopped at $sha1... $rest"
+               sha1_abbrev=$(git rev-parse --short $sha1)
+               warn "Stopped at $sha1_abbrev... $rest"
                exit_with_patch $sha1 0
                ;;
        squash|s|fixup|f)
@@ -866,12 +867,12 @@ add_exec_commands () {
 # $3: the input filename
 check_commit_sha () {
        badsha=0
-       if test -z $1
+       if test -z "$1"
        then
                badsha=1
        else
                sha1_verif="$(git rev-parse --verify --quiet $1^{commit})"
-               if test -z $sha1_verif
+               if test -z "$sha1_verif"
                then
                        badsha=1
                fi
@@ -1038,8 +1039,8 @@ check_todo_list () {
 # below were not inside any function, and expected to return
 # to the function that dot-sourced us.
 #
-# However, FreeBSD /bin/sh misbehaves on such a construct and
-# continues to run the statements that follow such a "return".
+# However, older (9.x) versions of FreeBSD /bin/sh misbehave on such a
+# construct and continue to run the statements that follow such a "return".
 # As a work-around, we introduce an extra layer of a function
 # here, and immediately call it after defining it.
 git_rebase__interactive () {