summaryrefslogtreecommitdiff
path: root/src/odb_pack.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-04-30 13:32:09 -0700
committerRussell Belfer <rb@github.com>2012-04-30 13:32:09 -0700
commit0dc8e95e1940017a9d6e8f5b13cf9a9ad644fc08 (patch)
tree49eed9a80b9e506953d18271bd03ae23558f29da /src/odb_pack.c
parent8b9ec201edf157f84735b8d220c10edafd9f4b5a (diff)
parent2de0652bb6d719eb937656153a920f20342bd5a4 (diff)
downloadlibgit2-0dc8e95e1940017a9d6e8f5b13cf9a9ad644fc08.tar.gz
Merge pull request #652 from nulltoken/topic/diff-callbacks
diff: provide more context to the consumer of the callbacks
Diffstat (limited to 'src/odb_pack.c')
-rw-r--r--src/odb_pack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/odb_pack.c b/src/odb_pack.c
index b91e3cadb..242200b4a 100644
--- a/src/odb_pack.c
+++ b/src/odb_pack.c
@@ -219,7 +219,7 @@ static int packfile_load__cb(void *_data, git_buf *path)
for (i = 0; i < backend->packs.length; ++i) {
struct git_pack_file *p = git_vector_get(&backend->packs, i);
- if (memcmp(p->pack_name, path->ptr, path->size - strlen(".idx")) == 0)
+ if (memcmp(p->pack_name, git_buf_cstr(path), git_buf_len(path) - strlen(".idx")) == 0)
return 0;
}