summaryrefslogtreecommitdiff
path: root/src/remote.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@elego.de>2012-11-13 13:41:01 -0800
committerCarlos Martín Nieto <cmn@elego.de>2012-11-13 13:53:41 -0800
commit47db054df053fb09c8c92edaa0238af2a2605e65 (patch)
treeb7a61fc24c910b0604a3493323d9064111d816b0 /src/remote.c
parent3ee078c0f7ed278be4839a6bde7dce29a614d336 (diff)
downloadlibgit2-47db054df053fb09c8c92edaa0238af2a2605e65.tar.gz
config: distinguish between a lone variable name and one without rhs
'[section] variable' and '[section] variable =' behave differently when parsed as booleans, so we need to store that distinction internally.
Diffstat (limited to 'src/remote.c')
-rw-r--r--src/remote.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/remote.c b/src/remote.c
index 8c46ca6a1..70a615246 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -136,7 +136,7 @@ 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 (!val) {
+ if (!val || strlen(val) == 0) {
giterr_set(GITERR_INVALID, "Malformed remote '%s' - missing URL", name);
error = -1;
goto cleanup;