summaryrefslogtreecommitdiff
path: root/builtin-ls-remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-ls-remote.c')
-rw-r--r--builtin-ls-remote.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin-ls-remote.c b/builtin-ls-remote.c
index 78a88f7476..b5bad0c184 100644
--- a/builtin-ls-remote.c
+++ b/builtin-ls-remote.c
@@ -86,10 +86,10 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
pattern[j - i] = p;
}
}
- remote = nongit ? NULL : remote_get(dest);
- if (remote && !remote->url_nr)
+ remote = remote_get(dest);
+ if (!remote->url_nr)
die("remote %s has no configured URL", dest);
- transport = transport_get(remote, remote ? remote->url[0] : dest);
+ transport = transport_get(remote, remote->url[0]);
if (uploadpack != NULL)
transport_set_option(transport, TRANS_OPT_UPLOADPACK, uploadpack);