summaryrefslogtreecommitdiffstats
path: root/refs.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-07-02 18:59:00 +0200
committerJunio C Hamano <gitster@pobox.com>2024-07-02 18:59:00 +0200
commit7b472da91541d672ee220896a3a7fd4508c378f3 (patch)
tree2687a29530b4a8b50c7f99a394cc5b69f06d7adb /refs.h
parentMerge branch 'ew/cat-file-unbuffered-tests' (diff)
parenthex: guard declarations with `USE_THE_REPOSITORY_VARIABLE` (diff)
downloadgit-7b472da91541d672ee220896a3a7fd4508c378f3.tar.xz
git-7b472da91541d672ee220896a3a7fd4508c378f3.zip
Merge branch 'ps/use-the-repository'
A CPP macro USE_THE_REPOSITORY_VARIABLE is introduced to help transition the codebase to rely less on the availability of the singleton the_repository instance. * ps/use-the-repository: hex: guard declarations with `USE_THE_REPOSITORY_VARIABLE` t/helper: remove dependency on `the_repository` in "proc-receive" t/helper: fix segfault in "oid-array" command without repository t/helper: use correct object hash in partial-clone helper compat/fsmonitor: fix socket path in networked SHA256 repos replace-object: use hash algorithm from passed-in repository protocol-caps: use hash algorithm from passed-in repository oidset: pass hash algorithm when parsing file http-fetch: don't crash when parsing packfile without a repo hash-ll: merge with "hash.h" refs: avoid include cycle with "repository.h" global: introduce `USE_THE_REPOSITORY_VARIABLE` macro hash: require hash algorithm in `empty_tree_oid_hex()` hash: require hash algorithm in `is_empty_{blob,tree}_oid()` hash: make `is_null_oid()` independent of `the_repository` hash: convert `oidcmp()` and `oideq()` to compare whole hash global: ensure that object IDs are always padded hash: require hash algorithm in `oidread()` and `oidclr()` hash: require hash algorithm in `hasheq()`, `hashcmp()` and `hashclr()` hash: drop (mostly) unused `is_empty_{blob,tree}_sha1()` functions
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/refs.h b/refs.h
index df8cbf6124..0ecba21b4a 100644
--- a/refs.h
+++ b/refs.h
@@ -2,21 +2,15 @@
#define REFS_H
#include "commit.h"
+#include "repository.h"
struct object_id;
struct ref_store;
-struct repository;
struct strbuf;
struct string_list;
struct string_list_item;
struct worktree;
-enum ref_storage_format {
- REF_STORAGE_FORMAT_UNKNOWN,
- REF_STORAGE_FORMAT_FILES,
- REF_STORAGE_FORMAT_REFTABLE,
-};
-
enum ref_storage_format ref_storage_format_by_name(const char *name);
const char *ref_storage_format_to_name(enum ref_storage_format ref_storage_format);