git-remote: add verbose mode to git remote update
Pass the verbose mode parameter to the underlying fetch command. $ ./git remote -v update Updating origin From git://git.kernel.org/pub/scm/git/git = [up to date] html -> origin/html = [up to date] maint -> origin/maint = [up to date] man -> origin/man = [up to date] master -> origin/master = [up to date] next -> origin/next = [up to date] pu -> origin/pu = [up to date] todo -> origin/todo Signed-off-by: Cheng Renquan <crquan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Cheng Renquan committed
Nov 18, 2008 at 19:04 UTC
dbbd56f1031992593f129168006b6c2f8bae13ec
1 file changed
+6
-2
builtin-remote.c
+6
-2
@@ -14,7 +14,7 @@ static const char * const builtin_remote_usage[] = {
14
"git remote rm <name>",
15
"git remote show [-n] <name>",
16
"git remote prune [-n | --dry-run] <name>",
17
- "git remote update [group]",
17
+ "git remote [-v | --verbose] update [group]",
18
NULL
19
};
20
@@ -42,7 +42,11 @@ static int opt_parse_track(const struct option *opt, const char *arg, int not)
42
43
static int fetch_remote(const char *name)
44
{
45
- const char *argv[] = { "fetch", name, NULL };
45
+ const char *argv[] = { "fetch", name, NULL, NULL };
46
+ if (verbose) {
47
+ argv[1] = "-v";
48
+ argv[2] = name;
49
+ }
50
printf("Updating %s\n", name);
51
if (run_command_v_opt(argv, RUN_GIT_CMD))
52
return error("Could not fetch %s", name);