aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-01-12 10:02:52 +0100
committerJunio C Hamano <gitster@pobox.com>2026-01-12 06:55:40 -0800
commit5a74903e62d7f4acdb2849103a2763b160a763b1 (patch)
treeb2668c90a3fdb50165a0bf75d029234f3652439e
parente615643d2ecf2d4e44b0ca29cf949a5212618245 (diff)
downloadgit-5a74903e62d7f4acdb2849103a2763b160a763b1.tar.xz
refs/files: remove `refs_check_dir` parameter
The parameter `refs_check_dir` determines which directory we want to check references for. But as we always want to check the complete refs hierarchy, this parameter is always set to "refs". Drop the parameter and hardcode it. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--refs/files-backend.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c
index feba3ee58b..0a104c7bf6 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -3898,7 +3898,6 @@ static const files_fsck_refs_fn fsck_refs_fn[]= {
static int files_fsck_refs_dir(struct ref_store *ref_store,
struct fsck_options *o,
- const char *refs_check_dir,
struct worktree *wt)
{
struct strbuf refname = STRBUF_INIT;
@@ -3907,7 +3906,7 @@ static int files_fsck_refs_dir(struct ref_store *ref_store,
int iter_status;
int ret = 0;
- strbuf_addf(&sb, "%s/%s", ref_store->gitdir, refs_check_dir);
+ strbuf_addf(&sb, "%s/refs", ref_store->gitdir);
iter = dir_iterator_begin(sb.buf, 0);
if (!iter) {
@@ -3927,8 +3926,7 @@ static int files_fsck_refs_dir(struct ref_store *ref_store,
if (!is_main_worktree(wt))
strbuf_addf(&refname, "worktrees/%s/", wt->id);
- strbuf_addf(&refname, "%s/%s", refs_check_dir,
- iter->relative_path);
+ strbuf_addf(&refname, "refs/%s", iter->relative_path);
if (o->verbose)
fprintf_ln(stderr, "Checking %s", refname.buf);
@@ -3960,7 +3958,7 @@ static int files_fsck_refs(struct ref_store *ref_store,
struct fsck_options *o,
struct worktree *wt)
{
- return files_fsck_refs_dir(ref_store, o, "refs", wt);
+ return files_fsck_refs_dir(ref_store, o, wt);
}
static int files_fsck(struct ref_store *ref_store,