Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-fetch.c')
-rw-r--r--builtin-fetch.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/builtin-fetch.c b/builtin-fetch.c
index a35a6f8cb8..013a6ba1b9 100644
--- a/builtin-fetch.c
+++ b/builtin-fetch.c
@@ -309,7 +309,10 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
if (!fp)
return error("cannot open %s: %s\n", filename, strerror(errno));
- url = transport_anonymize_url(raw_url);
+ if (raw_url)
+ url = transport_anonymize_url(raw_url);
+ else
+ url = xstrdup("foreign");
for (rm = ref_map; rm; rm = rm->next) {
struct ref *ref = NULL;
@@ -704,7 +707,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
if (!remote)
die("Where do you want to fetch from today?");
- transport = transport_get(remote, remote->url[0]);
+ transport = transport_get(remote, NULL);
if (verbosity >= 2)
transport->verbose = 1;
if (verbosity < 0)