int i;
const char *dest = NULL;
unsigned flags = 0;
+ int get_url = 0;
int quiet = 0;
const char *uploadpack = NULL;
const char **pattern = NULL;
quiet = 1;
continue;
}
+ if (!strcmp("--get-url", arg)) {
+ get_url = 1;
+ continue;
+ }
usage(ls_remote_usage);
}
dest = arg;
}
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);