Skip to content

Commit dbbd56f

Browse files
crquangitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4757745 commit dbbd56f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

builtin-remote.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ static const char * const builtin_remote_usage[] = {
1414
"git remote rm <name>",
1515
"git remote show [-n] <name>",
1616
"git remote prune [-n | --dry-run] <name>",
17-
"git remote update [group]",
17+
"git remote [-v | --verbose] update [group]",
1818
NULL
1919
};
2020

@@ -42,7 +42,11 @@ static int opt_parse_track(const struct option *opt, const char *arg, int not)
4242

4343
static int fetch_remote(const char *name)
4444
{
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+
}
4650
printf("Updating %s\n", name);
4751
if (run_command_v_opt(argv, RUN_GIT_CMD))
4852
return error("Could not fetch %s", name);

0 commit comments

Comments
 (0)