summaryrefslogtreecommitdiff
path: root/builtin-pack-objects.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r--builtin-pack-objects.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 8d7a1209d5..96c069a81d 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -597,15 +597,15 @@ static int add_object_entry(const unsigned char *sha1, unsigned hash, int exclud
if (!exclude) {
for (p = packed_git; p; p = p->next) {
- struct pack_entry e;
- if (find_pack_entry_one(sha1, &e, p)) {
+ unsigned long offset = find_pack_entry_one(sha1, p);
+ if (offset) {
if (incremental)
return 0;
if (local && !p->pack_local)
return 0;
if (!found_pack) {
- found_offset = e.offset;
- found_pack = e.p;
+ found_offset = offset;
+ found_pack = p;
}
}
}