filter-branch: use printf instead of echo -e
[gitweb.git] / git-rebase.sh
index f8b3d1fd9752a37c5424e06ba36da4648d0aba1b..aabbf6b69e5396080234a08e03cd951f9fe5d964 100755 (executable)
@@ -74,6 +74,7 @@ test "$(git config --bool rebase.stat)" = true && diffstat=t
 autostash="$(git config --bool rebase.autostash || echo false)"
 fork_point=auto
 git_am_opt=
+git_format_patch_opt=
 rebase_root=
 force_rebase=
 allow_rerere_autoupdate=
@@ -165,7 +166,7 @@ apply_autostash () {
        if test -f "$state_dir/autostash"
        then
                stash_sha1=$(cat "$state_dir/autostash")
-               if git stash apply $stash_sha1 2>&1 >/dev/null
+               if git stash apply $stash_sha1 >/dev/null 2>&1
                then
                        echo "$(gettext 'Applied autostash.')" >&2
                else
@@ -349,6 +350,9 @@ do
                shift
                break
                ;;
+       *)
+               usage
+               ;;
        esac
        shift
 done
@@ -445,6 +449,11 @@ else
        state_dir="$apply_dir"
 fi
 
+if test -t 2 && test -z "$GIT_QUIET"
+then
+       git_format_patch_opt="$git_format_patch_opt --progress"
+fi
+
 if test -z "$rebase_root"
 then
        case "$#" in