git-remote-ext
[gitweb.git] / git-rebase--interactive.sh
index 3419247d03e4147c777a1c7cbd7a39a61c1129df..a27952d9fdfb517f684b7d304831bf74d0ce237b 100755 (executable)
@@ -111,11 +111,12 @@ VERBOSE=
 OK_TO_SKIP_PRE_REBASE=
 REBASE_ROOT=
 AUTOSQUASH=
+test "$(git config --bool rebase.autosquash)" = "true" && AUTOSQUASH=t
 NEVER_FF=
 
-GIT_CHERRY_PICK_HELP="  After resolving the conflicts,
-mark the corrected paths with 'git add <paths>', and
-run 'git rebase --continue'"
+GIT_CHERRY_PICK_HELP="\
+hint: after resolving the conflicts, mark the corrected paths
+hint: with 'git add <paths>' and run 'git rebase --continue'"
 export GIT_CHERRY_PICK_HELP
 
 warn () {
@@ -625,7 +626,7 @@ skip_unnecessary_picks () {
                case "$fd,$command" in
                3,pick|3,p)
                        # pick a commit whose parent is current $ONTO -> skip
-                       sha1=$(printf '%s' "$rest" | cut -d ' ' -f 1)
+                       sha1=${rest%% *}
                        case "$(git rev-parse --verify --quiet "$sha1"^)" in
                        "$ONTO"*)
                                ONTO=$sha1
@@ -831,6 +832,9 @@ first and then run 'git rebase --continue' again."
        --autosquash)
                AUTOSQUASH=t
                ;;
+       --no-autosquash)
+               AUTOSQUASH=
+               ;;
        --onto)
                shift
                ONTO=$(parse_onto "$1") ||