From 293311618401b2b6a2cf4449f2a5fd9fd9c20e21 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Mon, 27 May 2024 14:18:39 +0200 Subject: [PATCH] moredebug --- builtin/refs.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/builtin/refs.c b/builtin/refs.c index 02401afa4e1d6b..2c1035aa737982 100644 --- a/builtin/refs.c +++ b/builtin/refs.c @@ -28,29 +28,44 @@ static int cmd_refs_migrate(int argc, const char **argv, const char *prefix) struct strbuf errbuf = STRBUF_INIT; int err; + fputs("parse options\n", stderr); + fflush(stderr); + argc = parse_options(argc, argv, prefix, options, migrate_usage, 0); if (argc) usage(_("too many arguments")); if (!format_str) usage(_("missing --ref-format=")); + fputs("ref storage format\n", stderr); + fflush(stderr); + format = ref_storage_format_by_name(format_str); if (format == REF_STORAGE_FORMAT_UNKNOWN) { err = error(_("unknown ref storage format '%s'"), format_str); goto out; } + fputs("double check\n", stderr); + fflush(stderr); + if (the_repository->ref_storage_format == format) { err = error(_("repository already uses '%s' format"), ref_storage_format_to_name(format)); goto out; } + fputs("repo migrate\n", stderr); + fflush(stderr); + if (repo_migrate_ref_storage_format(the_repository, format, flags, &errbuf) < 0) { err = error("%s", errbuf.buf); goto out; } + fputs("repo migrate done\n", stderr); + fflush(stderr); + err = 0; out: