diff options
| author | Patrick Steinhardt <ps@pks.im> | 2026-07-17 11:32:17 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-07-18 19:03:49 -0700 |
| commit | 810f8b203303f27543537d3ceadc90b065ed9c8f (patch) | |
| tree | f63706afbd3fbcd4585d53a7e1c05049ac984297 /contrib/persistent-https | |
| parent | a6c1e16b480a797a61a47616772e7254f7759053 (diff) | |
object-file: move logic to write loose objects
The logic to write loose objects is split up across "object-file.c" and
"odb/source-loose.c". This split is somewhat weird, but it is the result
of two things:
- `force_object_loose()` used to reach into internals of how exactly
we write objects.
- The logic of writing objects is intertwined with potentially
starting a transaction.
We have refactored `force_object_loose()` over preceding commits to work
via generic interfaces now, so this reason doesn't exist anymore. But
the second reason still does, as our management of "files" transactions
and their ad-hoc creation is still very messy. This area definitely
requires further work, and that work is indeed ongoing.
That being said, we can already move the writing logic into the "loose"
backend rather easily. All we have to do is to expose two functions that
relate to the transactions.
Expose these two functions and move the writing logic into the "loose"
backend accordingly so that it becomes more self-contained. Note that
this requires us to drop a reference to `the_repository` in favor of
using the source's repository in `start_loose_object_common()`.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions
