object-file: move `fetch_if_missing`
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Patrick Steinhardt committed
Nov 3, 2025 at 08:41 UTC
0cc12dedef2885dba8cf2635697767d394baf91f
2 files changed
+8
-8
object-file.h
-8
@@ -7,14 +7,6 @@
7
8
struct index_state;
9
10
-/*
11
- * Set this to 0 to prevent odb_read_object_info_extended() from fetching missing
12
- * blobs. This has a difference only if extensions.partialClone is set.
13
- *
14
- * Its default value is 1.
15
- */
16
-extern int fetch_if_missing;
17
-
10
enum {
11
INDEX_WRITE_OBJECT = (1 << 0),
12
INDEX_FORMAT_CHECK = (1 << 1),
odb.h
+8
@@ -14,6 +14,14 @@ struct strbuf;
14
struct repository;
15
struct multi_pack_index;
16
17
+/*
18
+ * Set this to 0 to prevent odb_read_object_info_extended() from fetching missing
19
+ * blobs. This has a difference only if extensions.partialClone is set.
20
+ *
21
+ * Its default value is 1.
22
+ */
23
+extern int fetch_if_missing;
24
+
25
/*
26
* Compute the exact path an alternate is at and returns it. In case of
27
* error NULL is returned and the human readable error is added to `err`