diff options
author | Junio C Hamano <junkio@cox.net> | 2007-06-02 12:18:51 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-06-02 12:18:51 -0700 |
commit | 17c2929aa2ed999cbefa75ca5e933e1bf53a95bf (patch) | |
tree | ae29ccac1e4fd717567db0f1dbabebeee3046d6c /pack-redundant.c | |
parent | 9b07873a52cc0243c2eddfac2e9c514152b96fb7 (diff) | |
parent | bc8e478a285ff549a3e5182461b064313d400de3 (diff) | |
download | git-17c2929aa2ed999cbefa75ca5e933e1bf53a95bf.tar.gz |
Merge branch 'sp/pack'
* sp/pack:
Style nit - don't put space after function names
Ensure the pack index is opened before access
Simplify index access condition in count-objects, pack-redundant
Test for recent rev-parse $abbrev_sha1 regression
rev-parse: Identify short sha1 sums correctly.
Attempt to delay prepare_alt_odb during get_sha1
Micro-optimize prepare_alt_odb
Lazily open pack index files on demand
Diffstat (limited to 'pack-redundant.c')
-rw-r--r-- | pack-redundant.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pack-redundant.c b/pack-redundant.c index 87077e150c..6bc3bdf3f4 100644 --- a/pack-redundant.c +++ b/pack-redundant.c @@ -550,6 +550,9 @@ static struct pack_list * add_pack(struct packed_git *p) l.pack = p; llist_init(&l.all_objects); + if (open_pack_index(p)) + return NULL; + base = p->index_data; base += 256 * 4 + ((p->index_version < 2) ? 4 : 8); step = (p->index_version < 2) ? 24 : 20; |