Skip to content

Commit 0cc12de

Browse files
pks-tgitster
authored andcommitted
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>
1 parent c2da110 commit 0cc12de

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

object-file.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,6 @@
77

88
struct index_state;
99

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-
1810
enum {
1911
INDEX_WRITE_OBJECT = (1 << 0),
2012
INDEX_FORMAT_CHECK = (1 << 1),

odb.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ struct strbuf;
1414
struct repository;
1515
struct multi_pack_index;
1616

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+
1725
/*
1826
* Compute the exact path an alternate is at and returns it. In case of
1927
* error NULL is returned and the human readable error is added to `err`

0 commit comments

Comments
 (0)