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

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2013-08-14 13:18:05 +0400
committerCarlos Martín Nieto <cmn@dwim.me>2013-08-14 13:52:49 +0400
commit0b9ebb54ff9aab86bb858e1d2952efa4dcdafefa (patch)
tree43abda1362b751f1889ea213cf3fff3e5f307f70 /src/remote.c
parent2af9bcb2dbb47adafa7eecbf41ff113da7fa9d1b (diff)
remote: relax the url rules
Accept any value for the remote's url, including an empty string which we used to reject as invalid configuration. This is not quite what git does (although it has its own problems with such configurations) and it makes it harder to fix the issue, by not letting the user modify it. As we already need to check for a valid URL when we try to connect to the network, let that perform the check, as we don't need to do it anywhere else.
Diffstat (limited to 'src/remote.c')
-rw-r--r--src/remote.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/remote.c b/src/remote.c
index 158f3e938..0dda196df 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -272,12 +272,6 @@ int git_remote_load(git_remote **out, git_repository *repo, const char *name)
if ((error = git_config_get_string(&val, config, git_buf_cstr(&buf))) < 0)
goto cleanup;
- if (strlen(val) == 0) {
- giterr_set(GITERR_INVALID, "Malformed remote '%s' - missing URL", name);
- error = -1;
- goto cleanup;
- }
-
remote->repo = repo;
remote->url = git__strdup(val);
GITERR_CHECK_ALLOC(remote->url);