diff options
author | Jeff King <peff@peff.net> | 2018-09-01 03:50:57 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-09-04 08:40:14 -0700 |
commit | 199c86be1623ab5053b4ed0ce6ed2ae974e3e859 (patch) | |
tree | 5ad5090b018fba30f1eecd290c4c3df993aa1093 /credential-cache.c | |
parent | traverse_bitmap_commit_list(): don't free result (diff) | |
download | tgif-199c86be1623ab5053b4ed0ce6ed2ae974e3e859.tar.xz |
pack-bitmap: drop "loaded" flag
In the early days of the bitmap code, there was a single
static bitmap_index struct that was used behind the scenes,
and any bitmap-related functions could lazily check
bitmap_git.loaded to see if they needed to read the on-disk
data.
But since 3ae5fa0768 (pack-bitmap: remove bitmap_git global
variable, 2018-06-07), the caller is responsible for the
lifetime of the bitmap_index struct, and we return it from
prepare_bitmap_git() and prepare_bitmap_walk(), both of
which load the on-disk data (or return NULL).
So outside of these functions, it's not possible to have a
bitmap_index for which the loaded flag is not true. Nor is
it possible to accidentally pass an already-loaded
bitmap_index to the loading function (which is static-local
to the file).
We can drop this unnecessary and confusing flag.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'credential-cache.c')
0 files changed, 0 insertions, 0 deletions