summaryrefslogtreecommitdiff
path: root/pack-redundant.c
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-05-30 02:12:28 -0400
committerJunio C Hamano <junkio@cox.net>2007-05-29 23:30:11 -0700
commiteaa867703927c1f383637979d16c40d996cea240 (patch)
tree482ee4084d7a9b3792129bdbc26227eebf0536b7 /pack-redundant.c
parent7ff895c0d229c2c60b73e91b0c389a4e3ce69e46 (diff)
downloadgit-eaa867703927c1f383637979d16c40d996cea240.tar.gz
Simplify index access condition in count-objects, pack-redundant
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>
Diffstat (limited to 'pack-redundant.c')
-rw-r--r--pack-redundant.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pack-redundant.c b/pack-redundant.c
index 06173206f0..6bc3bdf3f4 100644
--- a/pack-redundant.c
+++ b/pack-redundant.c
@@ -550,7 +550,7 @@ static struct pack_list * add_pack(struct packed_git *p)
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;