Browse Source

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 <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
main
Elijah Newren 1 year ago committed by Junio C Hamano
parent
commit
cbeab74713
  1. 1
      builtin/cat-file.c
  2. 1
      builtin/commit-graph.c
  3. 1
      builtin/fsck.c
  4. 1
      builtin/index-pack.c
  5. 1
      builtin/pack-objects.c
  6. 1
      builtin/prune.c
  7. 1
      builtin/replace.c
  8. 1
      builtin/unpack-objects.c
  9. 1
      builtin/upload-pack.c
  10. 8
      cache.h
  11. 1
      config.c
  12. 1
      environment.c
  13. 1
      git.c
  14. 1
      log-tree.c
  15. 9
      replace-object.h

1
builtin/cat-file.c

@ -18,6 +18,7 @@ @@ -18,6 +18,7 @@
#include "oid-array.h"
#include "packfile.h"
#include "object-store.h"
#include "replace-object.h"
#include "promisor-remote.h"
#include "mailmap.h"


1
builtin/commit-graph.c

@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
#include "commit-graph.h"
#include "object-store.h"
#include "progress.h"
#include "replace-object.h"
#include "tag.h"

#define BUILTIN_COMMIT_GRAPH_VERIFY_USAGE \

1
builtin/fsck.c

@ -20,6 +20,7 @@ @@ -20,6 +20,7 @@
#include "decorate.h"
#include "packfile.h"
#include "object-store.h"
#include "replace-object.h"
#include "resolve-undo.h"
#include "run-command.h"
#include "worktree.h"

1
builtin/index-pack.c

@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@
#include "thread-utils.h"
#include "packfile.h"
#include "object-store.h"
#include "replace-object.h"
#include "promisor-remote.h"

static const char index_pack_usage[] =

1
builtin/pack-objects.c

@ -32,6 +32,7 @@ @@ -32,6 +32,7 @@
#include "list.h"
#include "packfile.h"
#include "object-store.h"
#include "replace-object.h"
#include "dir.h"
#include "midx.h"
#include "trace2.h"

1
builtin/prune.c

@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
#include "parse-options.h"
#include "progress.h"
#include "prune-packed.h"
#include "replace-object.h"
#include "object-store.h"
#include "shallow.h"


1
builtin/replace.c

@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@
#include "parse-options.h"
#include "run-command.h"
#include "object-store.h"
#include "replace-object.h"
#include "repository.h"
#include "tag.h"


1
builtin/unpack-objects.c

@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
#include "pack.h"
#include "blob.h"
#include "commit.h"
#include "replace-object.h"
#include "tag.h"
#include "tree.h"
#include "tree-walk.h"

1
builtin/upload-pack.c

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
#include "pkt-line.h"
#include "parse-options.h"
#include "protocol.h"
#include "replace-object.h"
#include "upload-pack.h"
#include "serve.h"


8
cache.h

@ -886,14 +886,6 @@ void set_shared_repository(int value); @@ -886,14 +886,6 @@ void set_shared_repository(int value);
int get_shared_repository(void);
void reset_shared_repository(void);

/*
* Do replace refs need to be checked this run? This variable is
* initialized to true unless --no-replace-object is used or
* $GIT_NO_REPLACE_OBJECTS is set, but is set to false by some
* commands that do not want replace references to be active.
*/
extern int read_replace_refs;

/*
* These values are used to help identify parts of a repository to fsync.
* FSYNC_COMPONENT_NONE identifies data that will not be a persistent part of the

1
config.c

@ -23,6 +23,7 @@ @@ -23,6 +23,7 @@
#include "utf8.h"
#include "dir.h"
#include "color.h"
#include "replace-object.h"
#include "refs.h"
#include "worktree.h"


1
environment.c

@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
#include "commit.h"
#include "strvec.h"
#include "object-store.h"
#include "replace-object.h"
#include "tmp-objdir.h"
#include "chdir-notify.h"
#include "shallow.h"

1
git.c

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
#include "help.h"
#include "run-command.h"
#include "alias.h"
#include "replace-object.h"
#include "shallow.h"

#define RUN_SETUP (1<<0)

1
log-tree.c

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
#include "merge-ort.h"
#include "reflog-walk.h"
#include "refs.h"
#include "replace-object.h"
#include "string-list.h"
#include "color.h"
#include "gpg-interface.h"

9
replace-object.h

@ -1,11 +1,18 @@ @@ -1,11 +1,18 @@
#ifndef REPLACE_OBJECT_H
#define REPLACE_OBJECT_H

#include "cache.h"
#include "oidmap.h"
#include "repository.h"
#include "object-store.h"

/*
* Do replace refs need to be checked this run? This variable is
* initialized to true unless --no-replace-object is used or
* $GIT_NO_REPLACE_OBJECTS is set, but is set to false by some
* commands that do not want replace references to be active.
*/
extern int read_replace_refs;

struct replace_object {
struct oidmap_entry original;
struct object_id replacement;

Loading…
Cancel
Save