summaryrefslogtreecommitdiff
path: root/src/remote.c
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2012-05-07 10:57:34 +0200
committernulltoken <emeric.fermas@gmail.com>2012-05-08 10:05:12 +0200
commit9fb70f378ace77bf20ec67c5bce044114a0e0f93 (patch)
tree8908a3c17137fda8d55cefd2c808db39d84afdfa /src/remote.c
parent2fb9d6de95b7ba430cb2fab0da754a8074fa0c43 (diff)
downloadlibgit2-9fb70f378ace77bf20ec67c5bce044114a0e0f93.tar.gz
remote: make git_remote_load() return GIT_ENOTFOUND when the remote url cannot be retrieved from the config file
Diffstat (limited to 'src/remote.c')
-rw-r--r--src/remote.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/remote.c b/src/remote.c
index a30841427..6a1390dba 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -112,10 +112,8 @@ int git_remote_load(git_remote **out, git_repository *repo, const char *name)
goto cleanup;
}
- if (git_config_get_string(config, git_buf_cstr(&buf), &val) < 0) {
- error = -1;
+ if ((error = git_config_get_string(config, git_buf_cstr(&buf), &val)) < 0)
goto cleanup;
- }
remote->repo = repo;
remote->url = git__strdup(val);