diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-08-01 11:31:29 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-08-01 11:31:29 -0700 |
| commit | 0c1253014ef276b67504bbd1e56e386049eefdbd (patch) | |
| tree | 0eef35ae86011e53d94e93a8c95971c564a3f157 /builtin/gc.c | |
| parent | Merge branch 'lm/add-p-context' into next (diff) | |
| parent | object-file: get rid of `the_repository` in index-related functions (diff) | |
| download | git-0c1253014ef276b67504bbd1e56e386049eefdbd.tar.gz git-0c1253014ef276b67504bbd1e56e386049eefdbd.zip | |
Merge branch 'ps/object-file-wo-the-repository' into next
Reduce implicit assumption and dependence on the_repository in the
object-file subsystem.
* ps/object-file-wo-the-repository:
object-file: get rid of `the_repository` in index-related functions
object-file: get rid of `the_repository` in `force_object_loose()`
object-file: get rid of `the_repository` in `read_loose_object()`
object-file: get rid of `the_repository` in loose object iterators
object-file: remove declaration for `for_each_file_in_obj_subdir()`
object-file: inline `for_each_loose_file_in_objdir_buf()`
object-file: get rid of `the_repository` when writing objects
odb: introduce `odb_write_object()`
loose: write loose objects map via their source
object-file: get rid of `the_repository` in `finalize_object_file()`
object-file: get rid of `the_repository` in `loose_object_info()`
object-file: get rid of `the_repository` when freshening objects
object-file: inline `check_and_freshen()` functions
object-file: get rid of `the_repository` in `has_loose_object()`
object-file: stop using `the_hash_algo`
object-file: fix -Wsign-compare warnings
Diffstat (limited to 'builtin/gc.c')
| -rw-r--r-- | builtin/gc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/builtin/gc.c b/builtin/gc.c index 6fd4dc26be..0edd94a76f 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -1309,7 +1309,7 @@ static int loose_object_auto_condition(struct gc_config *cfg UNUSED) if (loose_object_auto_limit < 0) return 1; - return for_each_loose_file_in_objdir(the_repository->objects->sources->path, + return for_each_loose_file_in_source(the_repository->objects->sources, loose_object_count, NULL, NULL, &count); } @@ -1344,7 +1344,7 @@ static int pack_loose(struct maintenance_run_opts *opts) * Do not start pack-objects process * if there are no loose objects. */ - if (!for_each_loose_file_in_objdir(r->objects->sources->path, + if (!for_each_loose_file_in_source(r->objects->sources, bail_on_loose, NULL, NULL, NULL)) return 0; @@ -1384,11 +1384,9 @@ static int pack_loose(struct maintenance_run_opts *opts) else if (data.batch_size > 0) data.batch_size--; /* Decrease for equality on limit. */ - for_each_loose_file_in_objdir(r->objects->sources->path, + for_each_loose_file_in_source(r->objects->sources, write_loose_object_to_stdin, - NULL, - NULL, - &data); + NULL, NULL, &data); fclose(data.in); |
