diff options
| author | Jonathan Nieder <jrnieder@gmail.com> | 2011-05-02 23:02:15 -0500 |
|---|---|---|
| committer | Jonathan Nieder <jrnieder@gmail.com> | 2011-05-02 23:02:15 -0500 |
| commit | 59445b0b02c731872c8665ac7e9cf1226fa616e4 (patch) | |
| tree | 93922cf13ed9c62859dac628fa7e376977a23d24 /builtin/ls-remote.c | |
| parent | 6908e999468d7eb531a1609cee37673c5d3ca04f (diff) | |
| parent | ec014eac0e9e6f30cbbca616090fa2ecf74797e7 (diff) | |
| download | git-59445b0b02c731872c8665ac7e9cf1226fa616e4.tar.gz | |
Merge commit 'v1.7.5' into svn-fe
* commit 'v1.7.5': (436 commits)
Git 1.7.5
Git 1.7.5-rc3
Git 1.7.4.5
git-svn.txt: Document --mergeinfo
Revert "run-command: prettify -D_FORTIFY_SOURCE workaround"
...
Diffstat (limited to 'builtin/ls-remote.c')
| -rw-r--r-- | builtin/ls-remote.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c index 97eed4012b..1a1ff87e8f 100644 --- a/builtin/ls-remote.c +++ b/builtin/ls-remote.c @@ -33,6 +33,7 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix) int i; const char *dest = NULL; unsigned flags = 0; + int get_url = 0; int quiet = 0; const char *uploadpack = NULL; const char **pattern = NULL; @@ -69,6 +70,10 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix) quiet = 1; continue; } + if (!strcmp("--get-url", arg)) { + get_url = 1; + continue; + } usage(ls_remote_usage); } dest = arg; @@ -94,6 +99,12 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix) } if (!remote->url_nr) die("remote %s has no configured URL", dest); + + if (get_url) { + printf("%s\n", *remote->url); + return 0; + } + transport = transport_get(remote, NULL); if (uploadpack != NULL) transport_set_option(transport, TRANS_OPT_UPLOADPACK, uploadpack); |
