X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-remote.c;h=abc8dd8389be4a51b467b4f6d4f74e2037d65423;hb=b452cc16d85ea9de7d3f15c83a917b5534a91120;hp=3af18768e57bd96b4b3caa7db44f149f870d7077;hpb=1dd1239aa33ddd7f159cd183338ef6f71298e29a;p=git.git diff --git a/builtin-remote.c b/builtin-remote.c index 3af18768e..abc8dd838 100644 --- a/builtin-remote.c +++ b/builtin-remote.c @@ -8,13 +8,13 @@ #include "refs.h" static const char * const builtin_remote_usage[] = { - "git remote", - "git remote add ", + "git remote [-v | --verbose]", + "git remote add [-t ] [-m ] [-f] [--mirror] ", "git remote rename ", "git remote rm ", - "git remote show ", - "git remote prune ", - "git remote update [group]", + "git remote show [-n] ", + "git remote prune [-n | --dry-run] ", + "git remote [-v | --verbose] update [group]", NULL }; @@ -42,7 +42,11 @@ static int opt_parse_track(const struct option *opt, const char *arg, int not) static int fetch_remote(const char *name) { - const char *argv[] = { "fetch", name, NULL }; + const char *argv[] = { "fetch", name, NULL, NULL }; + if (verbose) { + argv[1] = "-v"; + argv[2] = name; + } printf("Updating %s\n", name); if (run_command_v_opt(argv, RUN_GIT_CMD)) return error("Could not fetch %s", name); @@ -321,7 +325,7 @@ static int add_branch_for_removal(const char *refname, /* make sure that symrefs are deleted */ if (flags & REF_ISSYMREF) - return unlink(git_path(refname)); + return unlink(git_path("%s", refname)); item = string_list_append(refname, branches->branches); item->util = xmalloc(20); @@ -770,7 +774,7 @@ static int get_one_remote_for_update(struct remote *remote, void *priv) { struct string_list *list = priv; if (!remote->skip_default_update) - string_list_append(xstrdup(remote->name), list); + string_list_append(remote->name, list); return 0; }