{"thread":{"id":"59965","subject":"[PATCH 0/6] fsck: squelch progress output with `--no-progress`","startedAt":"2023-07-08T00:31:34Z","lastAt":"2023-07-10T15:56:09Z","messageCount":8,"participants":["Taylor Blau","Derrick Stolee"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"479305","messageId":"cover.1688776280.git.me@ttaylorr.com","threadId":"59965","inReplyTo":null,"subject":"[PATCH 0/6] fsck: squelch progress output with `--no-progress`","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2023-07-08T00:31:28Z","receivedAt":"2023-07-08T00:31:34Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"This short series addresses a pair of issues where the `commit-graph\nverify` and `multi-pack-index verify` steps of `git fsck` produce output\nregardless of whether or not `fsck` was invoked with the\n`--no-progress` option or not.\n\nThe first two patches address the commit-graph and MIDX issues\nrespectively. The final four patches further clean up the output of\n`git commit-graph verify --progress` when verifying multi-layer graphs\nto produce a single progress meter instead of one per graph layer.\n\nBefore, the output of `git commit-graph verify` on a repository with a\ncommit-graph chain with two layers looked like:\n\n    $ git.compile commit-graph verify\n    Verifying commits in commit graph: 100% (4356/4356), done.\n    Verifying commits in commit graph: 100% (131912/131912), done.\n\nAfter this patch series, the output instead looks as follows:\n\n    $ git.compile commit-graph verify\n    Verifying commits in commit graph: 100% (136268/136268), done.\n\nThanks in advance for your review.\n\nTaylor Blau (6):\n  fsck: suppress commit-graph output with `--no-progress`\n  fsck: suppress MIDX output with `--no-progress`\n  commit-graph.c: extract `verify_one_commit_graph()`\n  commit-graph.c: iteratively verify commit-graph chains\n  commit-graph.c: pass progress to `verify_one_commit_graph()`\n  commit-graph.c: avoid duplicated progress output during `verify`\n\n builtin/fsck.c                |  8 ++++++\n commit-graph.c                | 53 +++++++++++++++++++++++------------\n t/t5318-commit-graph.sh       | 10 +++++++\n t/t5319-multi-pack-index.sh   | 12 ++++++++\n t/t5324-split-commit-graph.sh |  3 +-\n 5 files changed, 67 insertions(+), 19 deletions(-)\n\n-- \n2.41.0.242.g6eec849fa5a\n"},{"id":"479306","messageId":"b88140d3e4221ca314ac7627f3cb6370f0101cef.1688776280.git.me@ttaylorr.com","threadId":"59965","inReplyTo":"cover.1688776280.git.me@ttaylorr.com","subject":"[PATCH 1/6] fsck: suppress commit-graph output with `--no-progress`","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2023-07-08T00:31:31Z","receivedAt":"2023-07-08T00:31:39Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"Since e0fd51e1d7 (fsck: verify commit-graph, 2018-06-27), `fsck` runs\n`git commit-graph verify` to check the integrity of any commit-graph(s).\n\nOriginally, the `git commit-graph verify` step would always print to\nstdout/stderr, regardless of whether or not `fsck` was invoked with\n`--[no-]progress` or not. But in 7371612255 (commit-graph: add\n--[no-]progress to write and verify, 2019-08-26), the commit-graph\nmachinery learned the `--[no-]progress` option, though `fsck` was not\nupdated to pass this new flag (or not).\n\nThis led to seeing output from running `git fsck`, even with\n`--no-progress` on repositories that have a commit-graph:\n\n    $ git.compile fsck --connectivity-only --no-progress --no-dangling\n    Verifying commits in commit graph: 100% (4356/4356), done.\n    Verifying commits in commit graph: 100% (131912/131912), done.\n\nEnsure that `fsck` passes `--[no-]progress` as appropriate when calling\n`git commit-graph verify`.\n\nSigned-off-by: Taylor Blau <me@ttaylorr.com>\n---\n builtin/fsck.c          |  4 ++++\n t/t5318-commit-graph.sh | 10 ++++++++++\n 2 files changed, 14 insertions(+)\n\ndiff --git a/builtin/fsck.c b/builtin/fsck.c\nindex fa26462337a..e6473ecabc7 100644\n--- a/builtin/fsck.c\n+++ b/builtin/fsck.c\n@@ -1074,6 +1074,10 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)\n \t\t\tcommit_graph_verify.git_cmd = 1;\n \t\t\tstrvec_pushl(&commit_graph_verify.args, \"commit-graph\",\n \t\t\t\t     \"verify\", \"--object-dir\", odb->path, NULL);\n+\t\t\tif (show_progress)\n+\t\t\t\tstrvec_push(&commit_graph_verify.args, \"--progress\");\n+\t\t\telse\n+\t\t\t\tstrvec_push(&commit_graph_verify.args, \"--no-progress\");\n \t\t\tif (run_command(&commit_graph_verify))\n \t\t\t\terrors_found |= ERROR_COMMIT_GRAPH;\n \t\t}\ndiff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh\nindex b6e12115786..bf8a92317b3 100755\n--- a/t/t5318-commit-graph.sh\n+++ b/t/t5318-commit-graph.sh\n@@ -684,6 +684,16 @@ test_expect_success 'git fsck (checks commit-graph when config unset)' '\n \ttest_must_fail git fsck\n '\n \n+test_expect_success 'git fsck shows commit-graph output with --progress' '\n+\tgit -C \"$TRASH_DIRECTORY/full\" fsck --progress 2>err &&\n+\tgrep \"Verifying commits in commit graph\" err\n+'\n+\n+test_expect_success 'git fsck suppresses commit-graph output with --no-progress' '\n+\tgit -C \"$TRASH_DIRECTORY/full\" fsck --no-progress 2>err &&\n+\t! grep \"Verifying commits in commit graph\" err\n+'\n+\n test_expect_success 'setup non-the_repository tests' '\n \trm -rf repo &&\n \tgit init repo &&\n-- \n2.41.0.242.g6eec849fa5a\n\n"},{"id":"479307","messageId":"779466732ccf24ce982cf61a57aeb05a23cefba2.1688776280.git.me@ttaylorr.com","threadId":"59965","inReplyTo":"cover.1688776280.git.me@ttaylorr.com","subject":"[PATCH 2/6] fsck: suppress MIDX output with `--no-progress`","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2023-07-08T00:31:34Z","receivedAt":"2023-07-08T00:31:41Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"In a similar spirit as the previous commit, address a bug where `git\nfsck` produces output when calling `git multi-pack-index verify` even\nwhen invoked with `--no-progress`.\n\n    $ git.compile fsck --connectivity-only --no-progress --no-dangling\n    Verifying OID order in multi-pack-index: 100% (605677/605677), done.\n    Sorting objects by packfile: 100% (605678/605678), done.\n    Verifying object offsets: 100% (605678/605678), done.\n\nThe three lines produced by `git fsck` come from `git multi-pack-index\nverify`, but should be squelched due to `--no-progress`.\n\nThe MIDX machinery learned to generate these progress messages as early\nas 430efb8a74b (midx: add progress indicators in multi-pack-index\nverify, 2019-03-21), but did not respect `--progress` or `--no-progress`\nuntil ad60096d1c8 (midx: honor the MIDX_PROGRESS flag in\nverify_midx_file, 2019-10-21).\n\nBut the `git multi-pack-index verify` step was added to fsck in\n66ec0390e75 (fsck: verify multi-pack-index, 2018-09-13), pre-dating any\nof the above patches.\n\nPass `--[no-]progress` as appropriate to ensure that we don't produce\noutput when told not to.\n\nSigned-off-by: Taylor Blau <me@ttaylorr.com>\n---\n builtin/fsck.c              |  4 ++++\n t/t5319-multi-pack-index.sh | 12 ++++++++++++\n 2 files changed, 16 insertions(+)\n\ndiff --git a/builtin/fsck.c b/builtin/fsck.c\nindex e6473ecabc7..8959b3c7b87 100644\n--- a/builtin/fsck.c\n+++ b/builtin/fsck.c\n@@ -1092,6 +1092,10 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)\n \t\t\tmidx_verify.git_cmd = 1;\n \t\t\tstrvec_pushl(&midx_verify.args, \"multi-pack-index\",\n \t\t\t\t     \"verify\", \"--object-dir\", odb->path, NULL);\n+\t\t\tif (show_progress)\n+\t\t\t\tstrvec_push(&midx_verify.args, \"--progress\");\n+\t\t\telse\n+\t\t\t\tstrvec_push(&midx_verify.args, \"--no-progress\");\n \t\t\tif (run_command(&midx_verify))\n \t\t\t\terrors_found |= ERROR_MULTI_PACK_INDEX;\n \t\t}\ndiff --git a/t/t5319-multi-pack-index.sh b/t/t5319-multi-pack-index.sh\nindex 0883c7c6bd9..1bcc02004d7 100755\n--- a/t/t5319-multi-pack-index.sh\n+++ b/t/t5319-multi-pack-index.sh\n@@ -485,6 +485,18 @@ test_expect_success 'git-fsck incorrect offset' '\n \tgit -c core.multiPackIndex=false fsck\n '\n \n+test_expect_success 'git fsck shows MIDX output with --progress' '\n+\tgit fsck --progress 2>err &&\n+\tgrep \"Verifying OID order in multi-pack-index\" err &&\n+\tgrep \"Verifying object offsets\" err\n+'\n+\n+test_expect_success 'git fsck suppresses MIDX output with --no-progress' '\n+\tgit fsck --no-progress 2>err &&\n+\t! grep \"Verifying OID order in multi-pack-index\" err &&\n+\t! grep \"Verifying object offsets\" err\n+'\n+\n test_expect_success 'corrupt MIDX is not reused' '\n \tcorrupt_midx_and_verify $MIDX_BYTE_OFFSET \"\\377\" $objdir \\\n \t\t\"incorrect object offset\" &&\n-- \n2.41.0.242.g6eec849fa5a\n\n"},{"id":"479308","messageId":"8fa8871063018946e47515898c57377825ec95a8.1688776280.git.me@ttaylorr.com","threadId":"59965","inReplyTo":"cover.1688776280.git.me@ttaylorr.com","subject":"[PATCH 3/6] commit-graph.c: extract `verify_one_commit_graph()`","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2023-07-08T00:31:36Z","receivedAt":"2023-07-08T00:31:47Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"When the `verify_commit_graph()` function was extended to support\ncommit-graph chains via 3da4b609bb1 (commit-graph: verify chains with\n--shallow mode, 2019-06-18), it did so by recursively calling itself on\neach layer of the commit-graph chain.\n\nIn practice this poses no issues, since commit-graph chains do not loop,\nand there are few enough of them that adding additional frames to the\nstack is not a problem.\n\nA future commit will consolidate the progress output from `git\ncommit-graph verify` when verifying chained commit-graphs to print a\nsingle line instead of one progress meter per commit-graph layer.\nPrepare for this by extracting a routine to verify a single layer of a\ncommit-graph.\n\nNote that `verify_commit_graph()` is still recursive after this patch,\nbut this will change in the subsequent patch.\n\nSigned-off-by: Taylor Blau <me@ttaylorr.com>\n---\n commit-graph.c | 24 ++++++++++++++++--------\n 1 file changed, 16 insertions(+), 8 deletions(-)\n\ndiff --git a/commit-graph.c b/commit-graph.c\nindex f70afccada4..3d7cc11927d 100644\n--- a/commit-graph.c\n+++ b/commit-graph.c\n@@ -2542,18 +2542,14 @@ static int commit_graph_checksum_valid(struct commit_graph *g)\n \treturn hashfile_checksum_valid(g->data, g->data_len);\n }\n \n-int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags)\n+static int verify_one_commit_graph(struct repository *r,\n+\t\t\t\t   struct commit_graph *g,\n+\t\t\t\t   int flags)\n {\n \tuint32_t i, cur_fanout_pos = 0;\n \tstruct object_id prev_oid, cur_oid;\n \tint generation_zero = 0;\n \tstruct progress *progress = NULL;\n-\tint local_error = 0;\n-\n-\tif (!g) {\n-\t\tgraph_report(\"no commit-graph file loaded\");\n-\t\treturn 1;\n-\t}\n \n \tverify_commit_graph_error = verify_commit_graph_lite(g);\n \tif (verify_commit_graph_error)\n@@ -2699,7 +2695,19 @@ int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags)\n \t}\n \tstop_progress(&progress);\n \n-\tlocal_error = verify_commit_graph_error;\n+\treturn verify_commit_graph_error;\n+}\n+\n+int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags)\n+{\n+\tint local_error = 0;\n+\n+\tif (!g) {\n+\t\tgraph_report(\"no commit-graph file loaded\");\n+\t\treturn 1;\n+\t}\n+\n+\tlocal_error = verify_one_commit_graph(r, g, flags);\n \n \tif (!(flags & COMMIT_GRAPH_VERIFY_SHALLOW) && g->base_graph)\n \t\tlocal_error |= verify_commit_graph(r, g->base_graph, flags);\n-- \n2.41.0.242.g6eec849fa5a\n\n"},{"id":"479309","messageId":"4006bbf08548a8482d0aa4d4f3880de75ebf3c51.1688776280.git.me@ttaylorr.com","threadId":"59965","inReplyTo":"cover.1688776280.git.me@ttaylorr.com","subject":"[PATCH 4/6] commit-graph.c: iteratively verify commit-graph chains","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2023-07-08T00:31:39Z","receivedAt":"2023-07-08T00:31:49Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"Now that we have a function which can verify a single layer of a\ncommit-graph chain, implement `verify_commit_graph()` in terms of\niterating over commit-graphs along their `->base_graph` pointers.\n\nThis further prepares us to consolidate the progress output of `git\ncommit-graph verify`.\n\nSigned-off-by: Taylor Blau <me@ttaylorr.com>\n---\n commit-graph.c | 9 +++++----\n 1 file changed, 5 insertions(+), 4 deletions(-)\n\ndiff --git a/commit-graph.c b/commit-graph.c\nindex 3d7cc11927d..3c29ea7c706 100644\n--- a/commit-graph.c\n+++ b/commit-graph.c\n@@ -2707,10 +2707,11 @@ int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags)\n \t\treturn 1;\n \t}\n \n-\tlocal_error = verify_one_commit_graph(r, g, flags);\n-\n-\tif (!(flags & COMMIT_GRAPH_VERIFY_SHALLOW) && g->base_graph)\n-\t\tlocal_error |= verify_commit_graph(r, g->base_graph, flags);\n+\tfor (; g; g = g->base_graph) {\n+\t\tlocal_error |= verify_one_commit_graph(r, g, flags);\n+\t\tif (flags & COMMIT_GRAPH_VERIFY_SHALLOW)\n+\t\t\tbreak;\n+\t}\n \n \treturn local_error;\n }\n-- \n2.41.0.242.g6eec849fa5a\n\n"},{"id":"479310","messageId":"60fc2899d867c9532b5e5f79c3fcd4614726b393.1688776280.git.me@ttaylorr.com","threadId":"59965","inReplyTo":"cover.1688776280.git.me@ttaylorr.com","subject":"[PATCH 5/6] commit-graph.c: pass progress to `verify_one_commit_graph()`","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2023-07-08T00:31:42Z","receivedAt":"2023-07-08T00:31:52Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"This is the final step to prepare for consolidating the output of `git\ncommit-graph verify`. Instead of having each call to\n`verify_one_commit_graph()` initialize its own progress struct, have the\ncaller pass one in instead.\n\nThis patch does not alter the output of `git commit-graph verify`, but\nthe next commit will consolidate the output.\n\nSigned-off-by: Taylor Blau <me@ttaylorr.com>\n---\n commit-graph.c | 17 +++++++++--------\n 1 file changed, 9 insertions(+), 8 deletions(-)\n\ndiff --git a/commit-graph.c b/commit-graph.c\nindex 3c29ea7c706..65dd4edf0e1 100644\n--- a/commit-graph.c\n+++ b/commit-graph.c\n@@ -2544,12 +2544,11 @@ static int commit_graph_checksum_valid(struct commit_graph *g)\n \n static int verify_one_commit_graph(struct repository *r,\n \t\t\t\t   struct commit_graph *g,\n-\t\t\t\t   int flags)\n+\t\t\t\t   struct progress *progress)\n {\n \tuint32_t i, cur_fanout_pos = 0;\n \tstruct object_id prev_oid, cur_oid;\n \tint generation_zero = 0;\n-\tstruct progress *progress = NULL;\n \n \tverify_commit_graph_error = verify_commit_graph_lite(g);\n \tif (verify_commit_graph_error)\n@@ -2600,10 +2599,6 @@ static int verify_one_commit_graph(struct repository *r,\n \tif (verify_commit_graph_error & ~VERIFY_COMMIT_GRAPH_ERROR_HASH)\n \t\treturn verify_commit_graph_error;\n \n-\tif (flags & COMMIT_GRAPH_WRITE_PROGRESS)\n-\t\tprogress = start_progress(_(\"Verifying commits in commit graph\"),\n-\t\t\t\t\tg->num_commits);\n-\n \tfor (i = 0; i < g->num_commits; i++) {\n \t\tstruct commit *graph_commit, *odb_commit;\n \t\tstruct commit_list *graph_parents, *odb_parents;\n@@ -2693,7 +2688,6 @@ static int verify_one_commit_graph(struct repository *r,\n \t\t\t\t     graph_commit->date,\n \t\t\t\t     odb_commit->date);\n \t}\n-\tstop_progress(&progress);\n \n \treturn verify_commit_graph_error;\n }\n@@ -2708,9 +2702,16 @@ int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags)\n \t}\n \n \tfor (; g; g = g->base_graph) {\n-\t\tlocal_error |= verify_one_commit_graph(r, g, flags);\n+\t\tstruct progress *progress = NULL;\n+\t\tif (flags & COMMIT_GRAPH_WRITE_PROGRESS)\n+\t\t\tprogress = start_progress(_(\"Verifying commits in commit graph\"),\n+\t\t\t\t\t\tg->num_commits);\n+\n+\t\tlocal_error |= verify_one_commit_graph(r, g, progress);\n \t\tif (flags & COMMIT_GRAPH_VERIFY_SHALLOW)\n \t\t\tbreak;\n+\n+\t\tstop_progress(&progress);\n \t}\n \n \treturn local_error;\n-- \n2.41.0.242.g6eec849fa5a\n\n"},{"id":"479311","messageId":"6eec849fa5aa734670bfcba359ad470efbaf383c.1688776280.git.me@ttaylorr.com","threadId":"59965","inReplyTo":"cover.1688776280.git.me@ttaylorr.com","subject":"[PATCH 6/6] commit-graph.c: avoid duplicated progress output during `verify`","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2023-07-08T00:31:45Z","receivedAt":"2023-07-08T00:31:59Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"When `git commit-graph verify` was taught how to verify commit-graph\nchains in 3da4b609bb1 (commit-graph: verify chains with --shallow mode,\n2019-06-18), it produced one line of progress per layer of the\ncommit-graph chain.\n\n    $ git.compile commit-graph verify\n    Verifying commits in commit graph: 100% (4356/4356), done.\n    Verifying commits in commit graph: 100% (131912/131912), done.\n\nThis could be somewhat confusing to users, who may wonder why there are\nmultiple occurrences of \"Verifying commits in commit graph\".\n\nThere are likely good arguments on whether or not there should be\none line of progress output per commit-graph layer. On the one hand, the\nexisting output shows us verifying each individual layer of the chain.\nBut on the other hand, the fact that a commit-graph may be stored among\nmultiple layers is an implementation detail that the caller need not be\naware of.\n\nClarify this by showing a single progress meter regardless of the number\nof layers in the commit-graph chain. After this patch, the output\nreflects the logical contents of a commit-graph chain, instead of\nshowing one line of output per commit-graph layer:\n\n    $ git.compile commit-graph verify\n    Verifying commits in commit graph: 100% (136268/136268), done.\n\nSigned-off-by: Taylor Blau <me@ttaylorr.com>\n---\n commit-graph.c                | 27 +++++++++++++++++----------\n t/t5324-split-commit-graph.sh |  3 ++-\n 2 files changed, 19 insertions(+), 11 deletions(-)\n\ndiff --git a/commit-graph.c b/commit-graph.c\nindex 65dd4edf0e1..ffcf548223f 100644\n--- a/commit-graph.c\n+++ b/commit-graph.c\n@@ -2544,7 +2544,8 @@ static int commit_graph_checksum_valid(struct commit_graph *g)\n \n static int verify_one_commit_graph(struct repository *r,\n \t\t\t\t   struct commit_graph *g,\n-\t\t\t\t   struct progress *progress)\n+\t\t\t\t   struct progress *progress,\n+\t\t\t\t   uint64_t *seen)\n {\n \tuint32_t i, cur_fanout_pos = 0;\n \tstruct object_id prev_oid, cur_oid;\n@@ -2605,7 +2606,7 @@ static int verify_one_commit_graph(struct repository *r,\n \t\ttimestamp_t max_generation = 0;\n \t\ttimestamp_t generation;\n \n-\t\tdisplay_progress(progress, i + 1);\n+\t\tdisplay_progress(progress, ++(*seen));\n \t\toidread(&cur_oid, g->chunk_oid_lookup + g->hash_len * i);\n \n \t\tgraph_commit = lookup_commit(r, &cur_oid);\n@@ -2694,26 +2695,32 @@ static int verify_one_commit_graph(struct repository *r,\n \n int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags)\n {\n+\tstruct progress *progress = NULL;\n \tint local_error = 0;\n+\tuint64_t seen = 0;\n \n \tif (!g) {\n \t\tgraph_report(\"no commit-graph file loaded\");\n \t\treturn 1;\n \t}\n \n+\tif (flags & COMMIT_GRAPH_WRITE_PROGRESS) {\n+\t\tuint64_t total = g->num_commits;\n+\t\tif (!(flags & COMMIT_GRAPH_VERIFY_SHALLOW))\n+\t\t\ttotal += g->num_commits_in_base;\n+\n+\t\tprogress = start_progress(_(\"Verifying commits in commit graph\"),\n+\t\t\t\t\t  total);\n+\t}\n+\n \tfor (; g; g = g->base_graph) {\n-\t\tstruct progress *progress = NULL;\n-\t\tif (flags & COMMIT_GRAPH_WRITE_PROGRESS)\n-\t\t\tprogress = start_progress(_(\"Verifying commits in commit graph\"),\n-\t\t\t\t\t\tg->num_commits);\n-\n-\t\tlocal_error |= verify_one_commit_graph(r, g, progress);\n+\t\tlocal_error |= verify_one_commit_graph(r, g, progress, &seen);\n \t\tif (flags & COMMIT_GRAPH_VERIFY_SHALLOW)\n \t\t\tbreak;\n-\n-\t\tstop_progress(&progress);\n \t}\n \n+\tstop_progress(&progress);\n+\n \treturn local_error;\n }\n \ndiff --git a/t/t5324-split-commit-graph.sh b/t/t5324-split-commit-graph.sh\nindex 669ddc645fa..36c4141e67b 100755\n--- a/t/t5324-split-commit-graph.sh\n+++ b/t/t5324-split-commit-graph.sh\n@@ -351,7 +351,8 @@ test_expect_success 'add octopus merge' '\n \tgit branch merge/octopus &&\n \tgit commit-graph write --reachable --split &&\n \tgit commit-graph verify --progress 2>err &&\n-\ttest_line_count = 3 err &&\n+\ttest_line_count = 1 err &&\n+\tgrep \"Verifying commits in commit graph: 100% (18/18)\" err &&\n \ttest_i18ngrep ! warning err &&\n \ttest_line_count = 3 $graphdir/commit-graph-chain\n '\n-- \n2.41.0.242.g6eec849fa5a\n"},{"id":"479342","messageId":"21f0945a-c51d-304e-82ec-9f6253818668@github.com","threadId":"59965","inReplyTo":"cover.1688776280.git.me@ttaylorr.com","subject":"Re: [PATCH 0/6] fsck: squelch progress output with `--no-progress`","fromName":"Derrick Stolee","fromEmail":"derrickstolee@github.com","sentAt":"2023-07-10T15:55:26Z","receivedAt":"2023-07-10T15:56:09Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 7/7/2023 6:31 PM, Taylor Blau wrote:\n>This short series addresses a pair of issues where the `commit-graph\n>verify` and `multi-pack-index verify` steps of `git fsck` produce output\n>regardless of whether or not `fsck`was invoked with the\n>`--no-progress`option or not.\n>\n>The first two patches address the commit-graph and MIDX issues\n>respectively. The final four patches further clean up the output of\n>`git commit-graph verify --progress`when verifying multi-layer graphs\n>to produce a single progress meter instead of one per graph layer.\n>\n>Before, the output of `git commit-graph verify`on a repository with a\n>commit-graph chain with two layers looked like:\n>\n>    $ git.compile commit-graph verify\n>    Verifying commits in commit graph: 100% (4356/4356), done.\n>    Verifying commits in commit graph: 100% (131912/131912), done.\n>\n>After this patch series, the output instead looks as follows:\n>\n>    $ git.compile commit-graph verify\n>    Verifying commits in commit graph: 100% (136268/136268), done.\nThanks for noticing and fixing these issues. The patches are structured\nwell and make the refactoring easy to follow. This is especially tricky\nwhen swapping from recursive to iterative, but the patches break this\ndown nicely.\nv1 LGTM.\nThanks,\n-Stolee\n"}]}