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>2012-08-06 14:41:08 +0400
committerVicent Marti <tanoku@gmail.com>2012-08-06 14:41:08 +0400
commit51e1d8084641bd36416bf6f127b31d47d64cce69 (patch)
tree1a95e6b4c664020eb4bbff843eead794f3ee3d35 /src/odb_pack.c
parent7e9f78b5fee2d8f56711a587c35fcba10d370547 (diff)
parentb0d376695e7d3f71fed97d9d08b60661faad7a5a (diff)
Merge remote-tracking branch 'arrbee/tree-walk-fixes' into development
Conflicts: src/notes.c src/transports/git.c src/transports/http.c src/transports/local.c tests-clar/odb/foreach.c
Diffstat (limited to 'src/odb_pack.c')
-rw-r--r--src/odb_pack.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/odb_pack.c b/src/odb_pack.c
index bbfadccb2..8fc6e68e8 100644
--- a/src/odb_pack.c
+++ b/src/odb_pack.c
@@ -422,6 +422,7 @@ static int pack_backend__exists(git_odb_backend *backend, const git_oid *oid)
static int pack_backend__foreach(git_odb_backend *_backend, int (*cb)(git_oid *oid, void *data), void *data)
{
+ int error;
struct git_pack_file *p;
struct pack_backend *backend;
unsigned int i;
@@ -430,12 +431,14 @@ static int pack_backend__foreach(git_odb_backend *_backend, int (*cb)(git_oid *o
backend = (struct pack_backend *)_backend;
/* Make sure we know about the packfiles */
- if (packfile_refresh_all(backend) < 0)
- return -1;
+ if ((error = packfile_refresh_all(backend)) < 0)
+ return error;
git_vector_foreach(&backend->packs, i, p) {
- git_pack_foreach_entry(p, cb, &data);
+ if ((error = git_pack_foreach_entry(p, cb, &data)) < 0)
+ return error;
}
+
return 0;
}