Skip to content

Commit cab7d7d

Browse files
committed
Merge branch 'cr/remote-update-v'
* cr/remote-update-v: git-remote: add verbose mode to git remote update
2 parents 2d2b3fd + dbbd56f commit cab7d7d

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)