[PATCH v2 04/13] object-file: move `fetch_if_missing`
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Oct 31, 2025, 06:12 UTC
- Message-ID
- <20251031-b4-pks-odb-loose-backend-v2-4-920f721aef71@pks.im>
- In-Reply-To
- <20251031-b4-pks-odb-loose-backend-v2-0-920f721aef71@pks.im>
The `fetch_if_missing` global variable is declared in "object-file.h" but defined in "odb.c". The variable relates to the whole object database instead of only loose objects, so move the declaration into "odb.h" accordingly.
Signed-off-by: Patrick Steinhardt <ps@pks.im> --- object-file.h | 8 -------- odb.h | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/object-file.h b/object-file.h index 3fd48dcafbf..097e9764be1 100644 --- a/object-file.h +++ b/object-file.h @@ -7,14 +7,6 @@ struct index_state; -/* - * Set this to 0 to prevent odb_read_object_info_extended() from fetching missing - * blobs. This has a difference only if extensions.partialClone is set. - * - * Its default value is 1. - */ -extern int fetch_if_missing; - enum { INDEX_WRITE_OBJECT = (1 << 0), INDEX_FORMAT_CHECK = (1 << 1), diff --git a/odb.h b/odb.h index 2bec895d135..2346ffeca85 100644 --- a/odb.h +++ b/odb.h @@ -14,6 +14,14 @@ struct strbuf; struct repository; struct multi_pack_index; +/* + * Set this to 0 to prevent odb_read_object_info_extended() from fetching missing + * blobs. This has a difference only if extensions.partialClone is set. + * + * Its default value is 1. + */ +extern int fetch_if_missing; + /* * Compute the exact path an alternate is at and returns it. In case of * error NULL is returned and the human readable error is added to `err`
-- 2.51.2.1041.gc1ab5b90ca.dirty