diff options
Diffstat (limited to 'builtin/refs.c')
| -rw-r--r-- | builtin/refs.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/builtin/refs.c b/builtin/refs.c index a29f195834..998d2a2c1c 100644 --- a/builtin/refs.c +++ b/builtin/refs.c @@ -8,7 +8,7 @@ #include "worktree.h" #define REFS_MIGRATE_USAGE \ - N_("git refs migrate --ref-format=<format> [--dry-run]") + N_("git refs migrate --ref-format=<format> [--no-reflog] [--dry-run]") #define REFS_VERIFY_USAGE \ N_("git refs verify [--strict] [--verbose]") @@ -30,6 +30,9 @@ static int cmd_refs_migrate(int argc, const char **argv, const char *prefix, OPT_BIT(0, "dry-run", &flags, N_("perform a non-destructive dry-run"), REPO_MIGRATE_REF_STORAGE_FORMAT_DRYRUN), + OPT_BIT(0, "no-reflog", &flags, + N_("drop reflogs entirely during the migration"), + REPO_MIGRATE_REF_STORAGE_FORMAT_SKIP_REFLOG), OPT_END(), }; struct strbuf errbuf = STRBUF_INIT; @@ -88,7 +91,7 @@ static int cmd_refs_verify(int argc, const char **argv, const char *prefix, git_config(git_fsck_config, &fsck_refs_options); prepare_repo_settings(the_repository); - worktrees = get_worktrees(); + worktrees = get_worktrees_without_reading_head(); for (size_t i = 0; worktrees[i]; i++) ret |= refs_fsck(get_worktree_ref_store(worktrees[i]), &fsck_refs_options, worktrees[i]); |
