summaryrefslogtreecommitdiff
path: root/builtin-remote.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-06-09 07:29:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-06-09 07:29:36 (GMT)
commitf4f78e668dd40f2d4a5bc119cccb3c34c2675c38 (patch)
tree087d0d3e360643fcc12cef76bdbbb1c60686803c /builtin-remote.c
parent8513c54b2a4a821336d10fae6e02db70f0876abc (diff)
parent802f9c9cb21321d3ffe7576e01bbe31c51bd4c70 (diff)
downloadgit-f4f78e668dd40f2d4a5bc119cccb3c34c2675c38.zip
git-f4f78e668dd40f2d4a5bc119cccb3c34c2675c38.tar.gz
git-f4f78e668dd40f2d4a5bc119cccb3c34c2675c38.tar.bz2
Merge branch 'maint'
* maint: diff.c: plug a memory leak in an error path fetch-pack: close output channel after sideband demultiplexer terminates builtin-remote: Make "remote show" display all urls
Diffstat (limited to 'builtin-remote.c')
-rw-r--r--builtin-remote.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/builtin-remote.c b/builtin-remote.c
index f7d6618..d7ab6b2 100644
--- a/builtin-remote.c
+++ b/builtin-remote.c
@@ -1005,9 +1005,12 @@ static int show(int argc, const char **argv)
get_remote_ref_states(*argv, &states, query_flag);
- printf("* remote %s\n URL: %s\n", *argv,
- states.remote->url_nr > 0 ?
- states.remote->url[0] : "(no URL)");
+ printf("* remote %s\n", *argv);
+ if (states.remote->url_nr) {
+ for (i=0; i < states.remote->url_nr; i++)
+ printf(" URL: %s\n", states.remote->url[i]);
+ } else
+ printf(" URL: %s\n", "(no URL)");
if (no_query)
printf(" HEAD branch: (not queried)\n");
else if (!states.heads.nr)