summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArthur Schreiber <schreiber.arthur@googlemail.com>2014-05-30 19:26:49 +0200
committerArthur Schreiber <schreiber.arthur@googlemail.com>2014-05-30 19:26:49 +0200
commitd723dbed0c46ddb2fb037c63cc13a6131c3824b8 (patch)
tree86e870462a67da3cf605024e1d9f82a53293ccd5 /src
parent58eea5ebf40b698cbaf028b23ee6157d5eb6582c (diff)
downloadlibgit2-d723dbed0c46ddb2fb037c63cc13a6131c3824b8.tar.gz
Remote: Set an error when a remote cannot be found.
Inside `git_remote_load`, the calls to `get_optional_config` use `giterr_clear` to unset any errors that are set due to missing config keys. If neither a fetch nor a push url config was found for a remote, we should set an error again.
Diffstat (limited to 'src')
-rw-r--r--src/remote.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/remote.c b/src/remote.c
index f2e2e2f7a..abcf55e3d 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -403,6 +403,7 @@ int git_remote_load(git_remote **out, git_repository *repo, const char *name)
if (!optional_setting_found) {
error = GIT_ENOTFOUND;
+ giterr_set(GITERR_CONFIG, "Remote '%s' does not exist.", name);
goto cleanup;
}