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) | ||
commit | eaa867703927c1f383637979d16c40d996cea240 | |
tree | 482ee4084d7a9b3792129bdbc26227eebf0536b7 | tree | snapshot |
parent | 7ff895c0d229c2c60b73e91b0c389a4e3ce69e46 | commit | diff |
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>
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>
builtin-count-objects.c | diff | blob | history | |
pack-redundant.c | diff | blob | history |