]> granicus.if.org Git - git/commitdiff
rebase: turn on progress option by default for format-patch
authorKevin Willford <kewillf@microsoft.com>
Thu, 10 Aug 2017 18:32:56 +0000 (14:32 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 14 Aug 2017 21:09:46 +0000 (14:09 -0700)
Pass the "--progress" option to format-patch when the standard error
stream is connected to the terminal and "--quiet" is not given.

Signed-off-by: Kevin Willford <kewillf@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-rebase--am.sh
git-rebase.sh

index 375239341fbfe885e51a25e9e0dc2d4fee791345..ff98fe3a7328ea8443ebe9bbe0b8388021805d02 100644 (file)
@@ -53,6 +53,7 @@ else
 
        git format-patch -k --stdout --full-index --cherry-pick --right-only \
                --src-prefix=a/ --dst-prefix=b/ --no-renames --no-cover-letter \
+               $git_format_patch_opt \
                "$revisions" ${restrict_revision+^$restrict_revision} \
                >"$GIT_DIR/rebased-patches"
        ret=$?
index 2cf73b88e8e83ca34b9eb319dbc2b0a220139b0f..06f5082dc3f57e5b8fe718a74b8061383e2492b8 100755 (executable)
@@ -73,6 +73,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=
@@ -444,6 +445,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