Merge branch 'kn/ref-migrate-skip-reflog'

"git refs migrate" can optionally be told not to migrate the reflog.

* kn/ref-migrate-skip-reflog:
  builtin/refs: add '--no-reflog' flag to drop reflogs
This commit is contained in:
Junio C Hamano
2025-02-27 15:23:00 -08:00
5 changed files with 44 additions and 11 deletions

8
refs.c
View File

@@ -3043,9 +3043,11 @@ int repo_migrate_ref_storage_format(struct repository *repo,
if (ret < 0)
goto done;
ret = refs_for_each_reflog(old_refs, migrate_one_reflog, &data);
if (ret < 0)
goto done;
if (!(flags & REPO_MIGRATE_REF_STORAGE_FORMAT_SKIP_REFLOG)) {
ret = refs_for_each_reflog(old_refs, migrate_one_reflog, &data);
if (ret < 0)
goto done;
}
ret = ref_transaction_commit(transaction, errbuf);
if (ret < 0)