-q::
--quiet::
Pass --quiet to git-fetch-pack and silence any other internally
- used git commands.
+ used git commands. Progress is not reported to the standard error
+ stream.
-v::
--verbose::
Be verbose.
endif::git-pull[]
+
+--progress::
+ Progress status is reported on the standard error stream
+ by default when it is attached to a terminal, unless -q
+ is specified. This flag forces progress status even if the
+ standard error stream is not directed to a terminal.
};
static int all, append, dry_run, force, keep, multiple, prune, update_head_ok, verbosity;
+static int progress;
static int tags = TAGS_DEFAULT;
static const char *depth;
static const char *upload_pack;
OPT_BOOLEAN('k', "keep", &keep, "keep downloaded pack"),
OPT_BOOLEAN('u', "update-head-ok", &update_head_ok,
"allow updating of HEAD ref"),
+ OPT_BOOLEAN(0, "progress", &progress, "force progress reporting"),
OPT_STRING(0, "depth", &depth, "DEPTH",
"deepen history of shallow clone"),
OPT_END()
die("Where do you want to fetch from today?");
transport = transport_get(remote, NULL);
- transport_set_verbosity(transport, verbosity, 0);
+ transport_set_verbosity(transport, verbosity, progress);
if (upload_pack)
set_option(TRANS_OPT_UPLOADPACK, upload_pack);
if (keep)
test -f "$GIT_DIR/MERGE_HEAD" && die_merge
strategy_args= diffstat= no_commit= squash= no_ff= ff_only=
-log_arg= verbosity=
+log_arg= verbosity= progress=
merge_args=
curr_branch=$(git symbolic-ref -q HEAD)
curr_branch_short=$(echo "$curr_branch" | sed "s|refs/heads/||")
verbosity="$verbosity -q" ;;
-v|--verbose)
verbosity="$verbosity -v" ;;
+ --progress)
+ progress=--progress ;;
-n|--no-stat|--no-summary)
diffstat=--no-stat ;;
--stat|--summary)
done
}
orig_head=$(git rev-parse -q --verify HEAD)
-git fetch $verbosity --update-head-ok "$@" || exit 1
+git fetch $verbosity $progress --update-head-ok "$@" || exit 1
curr_head=$(git rev-parse -q --verify HEAD)
if test -n "$orig_head" && test "$curr_head" != "$orig_head"