mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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:
8
refs.c
8
refs.c
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user