diff options
| author | Junio C Hamano <gitster@pobox.com> | 2026-04-07 14:59:26 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-04-07 14:59:26 -0700 |
| commit | 7b6d0cd51b30e842ffb95d045385100b7c677886 (patch) | |
| tree | a12833ed2f687f197324fdc07ffa3112a2be7ae2 /builtin/refs.c | |
| parent | 59063fe8b415f150eecd38c63b0171a0e8449364 (diff) | |
| parent | 6fea405bb92100a229c0ee83c98e062e271577cd (diff) | |
| download | git-7b6d0cd51b30e842ffb95d045385100b7c677886.tar.xz | |
Merge branch 'ps/fsck-wo-the-repository'
Internals of "git fsck" have been refactored to not depend on the
global `the_repository` variable.
* ps/fsck-wo-the-repository:
builtin/fsck: stop using `the_repository` in error reporting
builtin/fsck: stop using `the_repository` when marking objects
builtin/fsck: stop using `the_repository` when checking packed objects
builtin/fsck: stop using `the_repository` with loose objects
builtin/fsck: stop using `the_repository` when checking reflogs
builtin/fsck: stop using `the_repository` when checking refs
builtin/fsck: stop using `the_repository` when snapshotting refs
builtin/fsck: fix trivial dependence on `the_repository`
fsck: drop USE_THE_REPOSITORY
fsck: store repository in fsck options
fsck: initialize fsck options via a function
fetch-pack: move fsck options into function scope
Diffstat (limited to 'builtin/refs.c')
| -rw-r--r-- | builtin/refs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/refs.c b/builtin/refs.c index 3064f888b2..e3125bc61b 100644 --- a/builtin/refs.c +++ b/builtin/refs.c @@ -78,9 +78,9 @@ out: } static int cmd_refs_verify(int argc, const char **argv, const char *prefix, - struct repository *repo UNUSED) + struct repository *repo) { - struct fsck_options fsck_refs_options = FSCK_REFS_OPTIONS_DEFAULT; + struct fsck_options fsck_refs_options; struct worktree **worktrees; const char * const verify_usage[] = { REFS_VERIFY_USAGE, @@ -93,6 +93,8 @@ static int cmd_refs_verify(int argc, const char **argv, const char *prefix, }; int ret = 0; + fsck_options_init(&fsck_refs_options, repo, FSCK_OPTIONS_REFS); + argc = parse_options(argc, argv, prefix, options, verify_usage, 0); if (argc) usage(_("'git refs verify' takes no arguments")); |
