Skip to content

Commit cbeab74

Browse files
newrengitster
authored andcommitted
replace-object.h: move read_replace_refs declaration from cache.h to here
Adjust several files to be more explicit about their dependency on replace-objects to accommodate this change. Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1c02840 commit cbeab74

15 files changed

+21
-9
lines changed

builtin/cat-file.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "oid-array.h"
1919
#include "packfile.h"
2020
#include "object-store.h"
21+
#include "replace-object.h"
2122
#include "promisor-remote.h"
2223
#include "mailmap.h"
2324

builtin/commit-graph.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "commit-graph.h"
99
#include "object-store.h"
1010
#include "progress.h"
11+
#include "replace-object.h"
1112
#include "tag.h"
1213

1314
#define BUILTIN_COMMIT_GRAPH_VERIFY_USAGE \

builtin/fsck.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "decorate.h"
2121
#include "packfile.h"
2222
#include "object-store.h"
23+
#include "replace-object.h"
2324
#include "resolve-undo.h"
2425
#include "run-command.h"
2526
#include "worktree.h"

builtin/index-pack.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "thread-utils.h"
1717
#include "packfile.h"
1818
#include "object-store.h"
19+
#include "replace-object.h"
1920
#include "promisor-remote.h"
2021

2122
static const char index_pack_usage[] =

builtin/pack-objects.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include "list.h"
3333
#include "packfile.h"
3434
#include "object-store.h"
35+
#include "replace-object.h"
3536
#include "dir.h"
3637
#include "midx.h"
3738
#include "trace2.h"

builtin/prune.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "parse-options.h"
99
#include "progress.h"
1010
#include "prune-packed.h"
11+
#include "replace-object.h"
1112
#include "object-store.h"
1213
#include "shallow.h"
1314

builtin/replace.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "parse-options.h"
1717
#include "run-command.h"
1818
#include "object-store.h"
19+
#include "replace-object.h"
1920
#include "repository.h"
2021
#include "tag.h"
2122

builtin/unpack-objects.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "pack.h"
1010
#include "blob.h"
1111
#include "commit.h"
12+
#include "replace-object.h"
1213
#include "tag.h"
1314
#include "tree.h"
1415
#include "tree-walk.h"

builtin/upload-pack.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "pkt-line.h"
55
#include "parse-options.h"
66
#include "protocol.h"
7+
#include "replace-object.h"
78
#include "upload-pack.h"
89
#include "serve.h"
910

cache.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -886,14 +886,6 @@ void set_shared_repository(int value);
886886
int get_shared_repository(void);
887887
void reset_shared_repository(void);
888888

889-
/*
890-
* Do replace refs need to be checked this run? This variable is
891-
* initialized to true unless --no-replace-object is used or
892-
* $GIT_NO_REPLACE_OBJECTS is set, but is set to false by some
893-
* commands that do not want replace references to be active.
894-
*/
895-
extern int read_replace_refs;
896-
897889
/*
898890
* These values are used to help identify parts of a repository to fsync.
899891
* FSYNC_COMPONENT_NONE identifies data that will not be a persistent part of the

0 commit comments

Comments
 (0)