diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-07-17 06:56:41 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-07-16 22:16:17 -0700 |
| commit | c2b5d1490a4b6b8b1a50b9ef82ec204811d7ccf1 (patch) | |
| tree | 622fdf5d907db68531132e3736f9fef01b9de88e /object-file.h | |
| parent | object-file: get rid of `the_repository` in `read_loose_object()` (diff) | |
| download | git-c2b5d1490a4b6b8b1a50b9ef82ec204811d7ccf1.tar.gz git-c2b5d1490a4b6b8b1a50b9ef82ec204811d7ccf1.zip | |
object-file: get rid of `the_repository` in `force_object_loose()`
The function `force_object_loose()` forces an object to become a loose
object in case it only exists in its packed form. To do so it implicitly
relies on `the_repository`.
Refactor the function by passing a `struct odb_source` as parameter.
While the check whether any such loose object exists already acts on the
whole object database, writing the loose object happens in one specific
source.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object-file.h')
| -rw-r--r-- | object-file.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/object-file.h b/object-file.h index 52f7979267..15d97630d3 100644 --- a/object-file.h +++ b/object-file.h @@ -161,7 +161,8 @@ int stream_loose_object(struct odb_source *source, struct input_stream *in_stream, size_t len, struct object_id *oid); -int force_object_loose(const struct object_id *oid, time_t mtime); +int force_object_loose(struct odb_source *source, + const struct object_id *oid, time_t mtime); /** * With in-core object data in "buf", rehash it to make sure the |
