summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7838106)
raw | patch | inline | side by side (parent: 7838106)
author | Tay Ray Chuan <rctay89@gmail.com> | |
Wed, 24 Feb 2010 12:50:28 +0000 (20:50 +0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 24 Feb 2010 16:35:45 +0000 (08:35 -0800) |
Note that in the documentation for git-pull, documentation for the
--progress option is displayed under the "Options related to fetching"
subtitle via fetch-options.txt.
Also, update the documentation of the -q/--quiet option for git-pull to
mention its effect on progress reporting during fetching.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
--progress option is displayed under the "Options related to fetching"
subtitle via fetch-options.txt.
Also, update the documentation of the -q/--quiet option for git-pull to
mention its effect on progress reporting during fetching.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/fetch-options.txt | patch | blob | history | |
Documentation/git-pull.txt | patch | blob | history | |
builtin-fetch.c | patch | blob | history | |
git-pull.sh | patch | blob | history |
index fe716b2e42642de5c6eefe600b98382069b41247..044ec882ccf9f8437862a5e59a3caee7030c36ae 100644 (file)
-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.
index d47f9ddd89e2b1057a58d43c591c5bd8c1d4b96f..ab4de103586e8382801dad7de2f43c57f4758e7e 100644 (file)
-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 6b96b41382c450914ca69a2d660eb3e07b190ed4..7f9f66916b995ef390f288cb4b7123e729ffaba9 100644 (file)
--- a/builtin-fetch.c
+++ b/builtin-fetch.c
};
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)
diff --git a/git-pull.sh b/git-pull.sh
index 38331a861106c63bf5f421dbe03f4aafe949812e..d45b50cf4783912cedc4b7764a609ea9b4176969 100755 (executable)
--- a/git-pull.sh
+++ b/git-pull.sh
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"