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:
authorVicent Marti <tanoku@gmail.com>2013-05-30 00:47:37 +0400
committerVicent Marti <tanoku@gmail.com>2013-05-30 00:47:37 +0400
commitec24e542969f9d49e41e4c2cb3eac2259b1818c2 (patch)
treefd201dedeabda91e8a0e63b27eeb24093a759988 /src/repository.c
parent56960b8396d3aef0b39f32aa7a9749202f925ada (diff)
What are the chances, really
Diffstat (limited to 'src/repository.c')
-rw-r--r--src/repository.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/repository.c b/src/repository.c
index 28505e822..2e7a334c9 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -1473,12 +1473,14 @@ static int at_least_one_cb(const char *refname, void *payload)
static int repo_contains_no_reference(git_repository *repo)
{
- int error = git_reference_foreach(repo, at_least_one_cb, NULL);
+ int error = git_reference_foreach_name(repo, &at_least_one_cb, NULL);
if (error == GIT_EUSER)
return 0;
+
if (!error)
return 1;
+
return error;
}