Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/fetch-options.txt9
-rw-r--r--Documentation/git-pull.txt4
-rw-r--r--builtin-fetch.c4
-rwxr-xr-xgit-pull.sh6
4 files changed, 18 insertions, 5 deletions
diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
index fe716b2e42..044ec882cc 100644
--- a/Documentation/fetch-options.txt
+++ b/Documentation/fetch-options.txt
@@ -78,9 +78,16 @@ ifndef::git-pull[]
-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.
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index d47f9ddd89..ab4de10358 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -33,7 +33,9 @@ OPTIONS
-q::
--quiet::
- Pass --quiet to git-fetch and git-merge.
+ This is passed to both underlying git-fetch to squelch reporting of
+ during transfer, and underlying git-merge to squelch output during
+ merging.
-v::
--verbose::
diff --git a/builtin-fetch.c b/builtin-fetch.c
index 6b96b41382..7f9f66916b 100644
--- a/builtin-fetch.c
+++ b/builtin-fetch.c
@@ -27,6 +27,7 @@ enum {
};
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;
@@ -56,6 +57,7 @@ static struct option builtin_fetch_options[] = {
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()
@@ -823,7 +825,7 @@ static int fetch_one(struct remote *remote, int argc, const char **argv)
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)
diff --git a/git-pull.sh b/git-pull.sh
index 38331a8611..d45b50cf47 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -38,7 +38,7 @@ test -z "$(git ls-files -u)" || die_conflict
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/||")
@@ -50,6 +50,8 @@ do
verbosity="$verbosity -q" ;;
-v|--verbose)
verbosity="$verbosity -v" ;;
+ --progress)
+ progress=--progress ;;
-n|--no-stat|--no-summary)
diffstat=--no-stat ;;
--stat|--summary)
@@ -214,7 +216,7 @@ test true = "$rebase" && {
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"