Add support for "import" helper command
[gitweb.git] / git-rebase--interactive.sh
index a43ee22c642a450e672ae4f5fdef688e2dbc16e5..53ad248ee505091d8e11cb9eb82ebb9b017b4262 100755 (executable)
@@ -346,7 +346,7 @@ do_next () {
                mark_action_done
                pick_one $sha1 ||
                        die_with_patch $sha1 "Could not apply $sha1... $rest"
-               output git commit --amend
+               git commit --amend
                ;;
        edit|e)
                comment_for_reflog edit
@@ -416,7 +416,12 @@ do_next () {
                ;;
        *)
                warn "Unknown command: $command $sha1 $rest"
-               die_with_patch $sha1 "Please fix this in the file $TODO."
+               if git rev-parse --verify -q "$sha1" >/dev/null
+               then
+                       die_with_patch $sha1 "Please fix this in the file $TODO."
+               else
+                       die "Please fix this in the file $TODO."
+               fi
                ;;
        esac
        test -s "$TODO" && return