summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7ff895c)
raw | patch | inline | side by side (parent: 7ff895c)
author | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 30 May 2007 06:12:28 +0000 (02:12 -0400) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 30 May 2007 06:30:11 +0000 (23:30 -0700) |
My earlier lazy index opening patch changed this condition to check
index_data and call open_pack_index if it was NULL. In truth we only
care about num_objects. Since open_pack_index does no harm if the
index is already open, and all indexes are likely to be closed in
this application, the "performance optimization" of inlining the
index_data check here was wrong.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
index_data and call open_pack_index if it was NULL. In truth we only
care about num_objects. Since open_pack_index does no harm if the
index is already open, and all indexes are likely to be closed in
this application, the "performance optimization" of inlining the
index_data check here was wrong.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-count-objects.c | patch | blob | history | |
pack-redundant.c | patch | blob | history |
index ac65e03e7f5203def8c412da95f254973119c14d..4274ec19500953bd7b6775e6d66271e9e116fa86 100644 (file)
--- a/builtin-count-objects.c
+++ b/builtin-count-objects.c
for (p = packed_git; p; p = p->next) {
if (!p->pack_local)
continue;
- if (!p->index_data && open_pack_index(p))
+ if (open_pack_index(p))
continue;
packed += p->num_objects;
num_pack++;
diff --git a/pack-redundant.c b/pack-redundant.c
index 06173206f09a39b2d9d572d7842f66674264964d..6bc3bdf3f4c33f369c63acf9284ce9af18286184 100644 (file)
--- a/pack-redundant.c
+++ b/pack-redundant.c
l.pack = p;
llist_init(&l.all_objects);
- if (!p->index_data && open_pack_index(p))
+ if (open_pack_index(p))
return NULL;
base = p->index_data;