diff options
author | Taylor Blau <me@ttaylorr.com> | 2023-07-08 02:31:31 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-07-10 19:02:37 +0200 |
commit | eda206f61125ec5e0985809c1cf0a853abca2ae7 (patch) | |
tree | e6f247fa9b6aa0fbfe02b695b8efeadc8c1dad75 /builtin | |
parent | Merge branch 'jk/redact-h2h3-headers-fix' into maint-2.41 (diff) | |
download | git-eda206f61125ec5e0985809c1cf0a853abca2ae7.tar.xz git-eda206f61125ec5e0985809c1cf0a853abca2ae7.zip |
fsck: suppress commit-graph output with `--no-progress`
Since e0fd51e1d7 (fsck: verify commit-graph, 2018-06-27), `fsck` runs
`git commit-graph verify` to check the integrity of any commit-graph(s).
Originally, the `git commit-graph verify` step would always print to
stdout/stderr, regardless of whether or not `fsck` was invoked with
`--[no-]progress` or not. But in 7371612255 (commit-graph: add
--[no-]progress to write and verify, 2019-08-26), the commit-graph
machinery learned the `--[no-]progress` option, though `fsck` was not
updated to pass this new flag (or not).
This led to seeing output from running `git fsck`, even with
`--no-progress` on repositories that have a commit-graph:
$ git.compile fsck --connectivity-only --no-progress --no-dangling
Verifying commits in commit graph: 100% (4356/4356), done.
Verifying commits in commit graph: 100% (131912/131912), done.
Ensure that `fsck` passes `--[no-]progress` as appropriate when calling
`git commit-graph verify`.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Acked-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/fsck.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/fsck.c b/builtin/fsck.c index dcc165bf0c..915dc8b9b3 100644 --- a/builtin/fsck.c +++ b/builtin/fsck.c @@ -1072,6 +1072,10 @@ int cmd_fsck(int argc, const char **argv, const char *prefix) commit_graph_verify.git_cmd = 1; strvec_pushl(&commit_graph_verify.args, "commit-graph", "verify", "--object-dir", odb->path, NULL); + if (show_progress) + strvec_push(&commit_graph_verify.args, "--progress"); + else + strvec_push(&commit_graph_verify.args, "--no-progress"); if (run_command(&commit_graph_verify)) errors_found |= ERROR_COMMIT_GRAPH; } |