Merge branch 'tb/cruft-packs'
A mechanism to pack unreachable objects into a "cruft pack", instead of ejecting them into loose form to be reclaimed later, has been introduced. * tb/cruft-packs: sha1-file.c: don't freshen cruft packs builtin/gc.c: conditionally avoid pruning objects via loose builtin/repack.c: add cruft packs to MIDX during geometric repack builtin/repack.c: use named flags for existing_packs builtin/repack.c: allow configuring cruft pack generation builtin/repack.c: support generating a cruft pack builtin/pack-objects.c: --cruft with expiration reachable: report precise timestamps from objects in cruft packs reachable: add options to add_unseen_recent_objects_to_traversal builtin/pack-objects.c: --cruft without expiration builtin/pack-objects.c: return from create_object_entry() t/helper: add 'pack-mtimes' test-tool pack-mtimes: support writing pack .mtimes files chunk-format.h: extract oid_version() pack-write: pass 'struct packing_data' to 'stage_tmp_packfiles' pack-mtimes: support reading .mtimes files Documentation/technical: add cruft-packs.txt
This commit is contained in:
@ -997,7 +997,7 @@ int has_loose_object_nonlocal(const struct object_id *oid)
|
||||
return check_and_freshen_nonlocal(oid, 0);
|
||||
}
|
||||
|
||||
static int has_loose_object(const struct object_id *oid)
|
||||
int has_loose_object(const struct object_id *oid)
|
||||
{
|
||||
return check_and_freshen(oid, 0);
|
||||
}
|
||||
@ -2040,6 +2040,8 @@ static int freshen_packed_object(const struct object_id *oid)
|
||||
struct pack_entry e;
|
||||
if (!find_pack_entry(the_repository, oid, &e))
|
||||
return 0;
|
||||
if (e.p->is_cruft)
|
||||
return 0;
|
||||
if (e.p->freshened)
|
||||
return 1;
|
||||
if (!freshen_file(e.p->pack_name))
|
||||
|
Reference in New Issue
Block a user