summaryrefslogtreecommitdiff
path: root/src/repository.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/repository.c')
-rw-r--r--src/repository.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/repository.c b/src/repository.c
index 87f6f7ab7..43a476016 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -627,10 +627,11 @@ int git_repository_config(git_config **out, git_repository *repo)
int git_repository_config_snapshot(git_config **out, git_repository *repo)
{
+ int error;
git_config *weak;
- if (git_repository_config__weakptr(&weak, repo) < 0)
- return -1;
+ if ((error = git_repository_config__weakptr(&weak, repo)) < 0)
+ return error;
return git_config_snapshot(out, weak);
}