From patchwork Sat Jul 8 00:31:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Blau X-Patchwork-Id: 13305458 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4B35EB64DA for ; Sat, 8 Jul 2023 00:31:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232820AbjGHAbi (ORCPT ); Fri, 7 Jul 2023 20:31:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229643AbjGHAbe (ORCPT ); Fri, 7 Jul 2023 20:31:34 -0400 Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 891A81991 for ; Fri, 7 Jul 2023 17:31:33 -0700 (PDT) Received: by mail-yb1-xb32.google.com with SMTP id 3f1490d57ef6-bff89873d34so2567721276.2 for ; Fri, 07 Jul 2023 17:31:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ttaylorr-com.20221208.gappssmtp.com; s=20221208; t=1688776292; x=1691368292; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=WVORtbrYg2YCHdaldyjZL5dqJmkpM6uxkWUFx2drBS0=; b=jNJFGqUTq6LB6tC768qmwjSgGuDEStwQFgnnPW74MzedG4ZLOkg31wn1QVTPbb3+Uh wJX672yPrhnHX2OEDxuyRGTwm1+2yZ7fnhTbK3dLwZtg7LOcfedbP23JT0kMQaFHTULZ yWvJ0s2agwhrFk5ijfc+kpv0Frjag/7JIkOxFacnT4GUSi8QTbm2VhemFr6tis7dN0LN cbso23Mlj9SmB+muUkicCE5ZiLxjcdcOcUxQTT8TUPPhQ/BpQDcnM5AEj3MgBMYzNKWr ondukCYbwyuMJy9g+HYC4kMtdU9qbdY+QbJYZo7/giL2dOSO/gQiRWdPByWbNU58TEAL H10g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688776292; x=1691368292; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=WVORtbrYg2YCHdaldyjZL5dqJmkpM6uxkWUFx2drBS0=; b=fRsyjgNSRRPwLk6k2gweju5t3SAslb9nvKJujwD+f98BkMF7r9I+kSE/JqG6Fd655t R2cQ9V6p2KMnDtoyQDMseS6D/JLBddLHSFgICLqZBnHn4/iSkbHU1GUPi0dLPUwTc62t TsU6L0af1ivuM3dkXFTYrrSyBHkv+SqBNcGOm0aodZNGNmtBIVzf8Tey0g36tAzk0Y/5 djy6KIekumFWMFKHWJSEicfwRbOFNo3OuqPuysmCAvGr0Y74JC5AtYrbgD/6Vvc2aKtg Y5lZ8LYpJ8zvGRLakJUs6U7213EyNl/AXCbunxtOsAV4H9PgH4TsHtlgiGzAFmG7G/YC 1k5Q== X-Gm-Message-State: ABy/qLYueVPulzwFmWDGyb3iH6ZdAjl6x66yLvQYQnUZjKfah5xk7n+D TlL3y7dvkOzl91xKPeYoB0SWVS6zxXIBeG0DnGZ7Cg== X-Google-Smtp-Source: APBJJlGuRUi+C6K4ldHTxdqFBQwDANklpARvEiMMpKXrZzPIMkII1I5XHPTYyxjP/oJYtAjJy1Pqdw== X-Received: by 2002:a25:5086:0:b0:c20:da9b:e6b3 with SMTP id e128-20020a255086000000b00c20da9be6b3mr5563129ybb.63.1688776292616; Fri, 07 Jul 2023 17:31:32 -0700 (PDT) Received: from localhost (104-178-186-189.lightspeed.milwwi.sbcglobal.net. [104.178.186.189]) by smtp.gmail.com with ESMTPSA id j184-20020a25d2c1000000b00c4f175716fcsm1271543ybg.20.2023.07.07.17.31.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jul 2023 17:31:32 -0700 (PDT) Date: Fri, 7 Jul 2023 20:31:31 -0400 From: Taylor Blau To: git@vger.kernel.org Cc: Junio C Hamano , Derrick Stolee Subject: [PATCH 1/6] fsck: suppress commit-graph output with `--no-progress` Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org 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 --- builtin/fsck.c | 4 ++++ t/t5318-commit-graph.sh | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/builtin/fsck.c b/builtin/fsck.c index fa26462337a..e6473ecabc7 100644 --- a/builtin/fsck.c +++ b/builtin/fsck.c @@ -1074,6 +1074,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; } diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh index b6e12115786..bf8a92317b3 100755 --- a/t/t5318-commit-graph.sh +++ b/t/t5318-commit-graph.sh @@ -684,6 +684,16 @@ test_expect_success 'git fsck (checks commit-graph when config unset)' ' test_must_fail git fsck ' +test_expect_success 'git fsck shows commit-graph output with --progress' ' + git -C "$TRASH_DIRECTORY/full" fsck --progress 2>err && + grep "Verifying commits in commit graph" err +' + +test_expect_success 'git fsck suppresses commit-graph output with --no-progress' ' + git -C "$TRASH_DIRECTORY/full" fsck --no-progress 2>err && + ! grep "Verifying commits in commit graph" err +' + test_expect_success 'setup non-the_repository tests' ' rm -rf repo && git init repo && From patchwork Sat Jul 8 00:31:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Blau X-Patchwork-Id: 13305459 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E344EB64D9 for ; Sat, 8 Jul 2023 00:31:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232827AbjGHAbj (ORCPT ); Fri, 7 Jul 2023 20:31:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231617AbjGHAbh (ORCPT ); Fri, 7 Jul 2023 20:31:37 -0400 Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48B3E1FC7 for ; Fri, 7 Jul 2023 17:31:36 -0700 (PDT) Received: by mail-yb1-xb31.google.com with SMTP id 3f1490d57ef6-c5e76dfcc36so2789580276.2 for ; Fri, 07 Jul 2023 17:31:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ttaylorr-com.20221208.gappssmtp.com; s=20221208; t=1688776295; x=1691368295; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=wpNqXGtWosTJRHx//ty9/vbv2/HxZAXF5sfv6OZG4QM=; b=K88WMLb0qOsVhFUC0s3+or1El5lZrWN3LqWPnLQzfMaQKB3ARNNLgle9gxhX34Ta7G gy3cVU28mRsLIkqmg0MdhXLpaIeyV2KAIaJfroHUpZeGMBF33Eojq46GG3OIltA/r1G1 cNOKOB0c7x8nJ8bFbLRw6dbLmmBYVzwOv0sRHGk7j4AjOuaDrLKcXH+8/e8IV5U8ITo6 lESCIHUtJCgWqYX0gkG8oi4y76Jod/qOAAIKEFGmRxeCf814CWEk2lZtP0DKl5ZxZTLk 0X2CYV4EvtNmCMnm/TgnNZfmBjL8bYOWNcswll2CtTemG7U/eKLXZwoaOHKiQ+jpvj9J zfhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688776295; x=1691368295; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=wpNqXGtWosTJRHx//ty9/vbv2/HxZAXF5sfv6OZG4QM=; b=RpJdATSQU/+zOX5gqUTbK+tRFQnPdVOFNo749P6Xsee2VNSSroMBXpy3sRkMKE2tpu J3Dop2SEgiV0PORc+YZbWOhLCpZag5U/LxAu4YU2VlWdXNd6ScN8KB3TiGrXdG0bGlBJ lcnZjRw4tS2Xkwgm/kdn2OFqWlIQP0lgBHGu14JJJ7gAbAL7a3PSlcUKAntFu2YcY5i1 LHzInQC5TxyAaZecrh0vXrHQsLH9wpz4UZ3Zu7Z5v6u4lRBse7jWX/nSVTgfoYmXf5Ce TJHqsbgxK+O2rpoFBqmyNSemsoceqYq+uzGAj5LjdereqNLHlaysxzUoS/7WvpDsJNT6 8oIA== X-Gm-Message-State: ABy/qLaeSOiA58cPci1F0dKAjlD6oeXcSMXAwQMXJqktSx9YtUPEROoD sIvrmDP0fn+CVBfgs5RYjKUbkHXkxUFdjFUWKaXClA== X-Google-Smtp-Source: APBJJlG7d0UV1ci/ZOprUWU0ozoFJIFzLKXPVe4kK/fppU+GOF3ocktD12pNDSv6xifsN92S4KNZ9Q== X-Received: by 2002:a0d:e241:0:b0:573:d710:6f88 with SMTP id l62-20020a0de241000000b00573d7106f88mr5895569ywe.36.1688776295344; Fri, 07 Jul 2023 17:31:35 -0700 (PDT) Received: from localhost (104-178-186-189.lightspeed.milwwi.sbcglobal.net. [104.178.186.189]) by smtp.gmail.com with ESMTPSA id u63-20020a816042000000b0054c0f3fd3ddsm1414452ywb.30.2023.07.07.17.31.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jul 2023 17:31:35 -0700 (PDT) Date: Fri, 7 Jul 2023 20:31:34 -0400 From: Taylor Blau To: git@vger.kernel.org Cc: Junio C Hamano , Derrick Stolee Subject: [PATCH 2/6] fsck: suppress MIDX output with `--no-progress` Message-ID: <779466732ccf24ce982cf61a57aeb05a23cefba2.1688776280.git.me@ttaylorr.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org In a similar spirit as the previous commit, address a bug where `git fsck` produces output when calling `git multi-pack-index verify` even when invoked with `--no-progress`. $ git.compile fsck --connectivity-only --no-progress --no-dangling Verifying OID order in multi-pack-index: 100% (605677/605677), done. Sorting objects by packfile: 100% (605678/605678), done. Verifying object offsets: 100% (605678/605678), done. The three lines produced by `git fsck` come from `git multi-pack-index verify`, but should be squelched due to `--no-progress`. The MIDX machinery learned to generate these progress messages as early as 430efb8a74b (midx: add progress indicators in multi-pack-index verify, 2019-03-21), but did not respect `--progress` or `--no-progress` until ad60096d1c8 (midx: honor the MIDX_PROGRESS flag in verify_midx_file, 2019-10-21). But the `git multi-pack-index verify` step was added to fsck in 66ec0390e75 (fsck: verify multi-pack-index, 2018-09-13), pre-dating any of the above patches. Pass `--[no-]progress` as appropriate to ensure that we don't produce output when told not to. Signed-off-by: Taylor Blau --- builtin/fsck.c | 4 ++++ t/t5319-multi-pack-index.sh | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/builtin/fsck.c b/builtin/fsck.c index e6473ecabc7..8959b3c7b87 100644 --- a/builtin/fsck.c +++ b/builtin/fsck.c @@ -1092,6 +1092,10 @@ int cmd_fsck(int argc, const char **argv, const char *prefix) midx_verify.git_cmd = 1; strvec_pushl(&midx_verify.args, "multi-pack-index", "verify", "--object-dir", odb->path, NULL); + if (show_progress) + strvec_push(&midx_verify.args, "--progress"); + else + strvec_push(&midx_verify.args, "--no-progress"); if (run_command(&midx_verify)) errors_found |= ERROR_MULTI_PACK_INDEX; } diff --git a/t/t5319-multi-pack-index.sh b/t/t5319-multi-pack-index.sh index 0883c7c6bd9..1bcc02004d7 100755 --- a/t/t5319-multi-pack-index.sh +++ b/t/t5319-multi-pack-index.sh @@ -485,6 +485,18 @@ test_expect_success 'git-fsck incorrect offset' ' git -c core.multiPackIndex=false fsck ' +test_expect_success 'git fsck shows MIDX output with --progress' ' + git fsck --progress 2>err && + grep "Verifying OID order in multi-pack-index" err && + grep "Verifying object offsets" err +' + +test_expect_success 'git fsck suppresses MIDX output with --no-progress' ' + git fsck --no-progress 2>err && + ! grep "Verifying OID order in multi-pack-index" err && + ! grep "Verifying object offsets" err +' + test_expect_success 'corrupt MIDX is not reused' ' corrupt_midx_and_verify $MIDX_BYTE_OFFSET "\377" $objdir \ "incorrect object offset" && From patchwork Sat Jul 8 00:31:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Blau X-Patchwork-Id: 13305460 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89AA6EB64DA for ; Sat, 8 Jul 2023 00:31:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232828AbjGHAbq (ORCPT ); Fri, 7 Jul 2023 20:31:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229643AbjGHAbk (ORCPT ); Fri, 7 Jul 2023 20:31:40 -0400 Received: from mail-yb1-xb35.google.com (mail-yb1-xb35.google.com [IPv6:2607:f8b0:4864:20::b35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDEEF1FEA for ; Fri, 7 Jul 2023 17:31:38 -0700 (PDT) Received: by mail-yb1-xb35.google.com with SMTP id 3f1490d57ef6-bff27026cb0so2778425276.1 for ; Fri, 07 Jul 2023 17:31:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ttaylorr-com.20221208.gappssmtp.com; s=20221208; t=1688776298; x=1691368298; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=zH2yvQSzxwyyFNjBPhsGMWv6DNRIiMtluAGBG5t/Zzc=; b=sGk6vQEO+8NWST0YvPmiZRu3pf7GXZool1QuNrP/xh5SlRXC/HivrI919TrQRRNzN+ BYfgpEfRJZpBunYeUiVeI1XkFjXO1Lmabvunc8N+wC64Kfane9SVZdjWJnZDRdKf9/0h baNT6mqQp83Ozb0rrRrvNcmuebM9LClrDC58uiM3sGFSeq5377dnpgbN1Wpj902+0I7U WUigbq93GNT7WDTk1nuUMxbS4/h+g8snvlnBzkuUeuKOaPL/3oXlST1hyqpXy5vS88o+ nWce2mJhWV/Jq5zYS/L5L9pHULWx1gszWGMaFd7baoVguZRzQO0ez2w/ek+HbIWvXZGh Q9qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688776298; x=1691368298; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=zH2yvQSzxwyyFNjBPhsGMWv6DNRIiMtluAGBG5t/Zzc=; b=cw0/H4hdKuXFkvC6m4qAWXIUwIbb/zCg7A3e0fSIsTq2vPDLXHCDI3DOV8+3E9pASe /86M2BrVsYnVI5Ab3CCrN+LiiSr4N+y8SmfDRAIyyZul2IgeWqkoIVhJO2aadXMlT1Ph 2OOOmbaeHOUW9p2/FekoK4B3w2Y7e7LqjdEIbEAFxDtqpN7e0GhhUSxBPjO0KLHebIIC 498irxvneGhNDwqsDdCBMXaQBb62z5ZCTT4xZRLnh40rN3gF1DL3T7lmd4NolSIHN71m n+ug3OY1b/73XPjNHLz/REnEJ/pgzBmZ0LE08XF4qi47sL3wgsAS+E8Btx2TSvu4uDxi PrBg== X-Gm-Message-State: ABy/qLYnbn+tNfmQMsD0q851kYYec7aU6DV1PGvChu83//fn341o+fHw kFNpE4Y9G8bRrjw1IAqJbQaOq0NieTFNUp2kdJpPSA== X-Google-Smtp-Source: APBJJlHfI86Y51jLLhBMvZWac7QKXYjzcxzBgewm2GkdGPkh0d6NjvJ9zjlGoqSdMZSl9GUXuEYhng== X-Received: by 2002:a25:a245:0:b0:c5c:2fa:5e14 with SMTP id b63-20020a25a245000000b00c5c02fa5e14mr5816631ybi.8.1688776298022; Fri, 07 Jul 2023 17:31:38 -0700 (PDT) Received: from localhost (104-178-186-189.lightspeed.milwwi.sbcglobal.net. [104.178.186.189]) by smtp.gmail.com with ESMTPSA id d23-20020a25e617000000b00bceb538a275sm1261785ybh.21.2023.07.07.17.31.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jul 2023 17:31:37 -0700 (PDT) Date: Fri, 7 Jul 2023 20:31:36 -0400 From: Taylor Blau To: git@vger.kernel.org Cc: Junio C Hamano , Derrick Stolee Subject: [PATCH 3/6] commit-graph.c: extract `verify_one_commit_graph()` Message-ID: <8fa8871063018946e47515898c57377825ec95a8.1688776280.git.me@ttaylorr.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org When the `verify_commit_graph()` function was extended to support commit-graph chains via 3da4b609bb1 (commit-graph: verify chains with --shallow mode, 2019-06-18), it did so by recursively calling itself on each layer of the commit-graph chain. In practice this poses no issues, since commit-graph chains do not loop, and there are few enough of them that adding additional frames to the stack is not a problem. A future commit will consolidate the progress output from `git commit-graph verify` when verifying chained commit-graphs to print a single line instead of one progress meter per commit-graph layer. Prepare for this by extracting a routine to verify a single layer of a commit-graph. Note that `verify_commit_graph()` is still recursive after this patch, but this will change in the subsequent patch. Signed-off-by: Taylor Blau --- commit-graph.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/commit-graph.c b/commit-graph.c index f70afccada4..3d7cc11927d 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -2542,18 +2542,14 @@ static int commit_graph_checksum_valid(struct commit_graph *g) return hashfile_checksum_valid(g->data, g->data_len); } -int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags) +static int verify_one_commit_graph(struct repository *r, + struct commit_graph *g, + int flags) { uint32_t i, cur_fanout_pos = 0; struct object_id prev_oid, cur_oid; int generation_zero = 0; struct progress *progress = NULL; - int local_error = 0; - - if (!g) { - graph_report("no commit-graph file loaded"); - return 1; - } verify_commit_graph_error = verify_commit_graph_lite(g); if (verify_commit_graph_error) @@ -2699,7 +2695,19 @@ int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags) } stop_progress(&progress); - local_error = verify_commit_graph_error; + return verify_commit_graph_error; +} + +int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags) +{ + int local_error = 0; + + if (!g) { + graph_report("no commit-graph file loaded"); + return 1; + } + + local_error = verify_one_commit_graph(r, g, flags); if (!(flags & COMMIT_GRAPH_VERIFY_SHALLOW) && g->base_graph) local_error |= verify_commit_graph(r, g->base_graph, flags); From patchwork Sat Jul 8 00:31:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Blau X-Patchwork-Id: 13305461 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB41EEB64D9 for ; Sat, 8 Jul 2023 00:31:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232842AbjGHAbs (ORCPT ); Fri, 7 Jul 2023 20:31:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232847AbjGHAbp (ORCPT ); Fri, 7 Jul 2023 20:31:45 -0400 Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE4F81FF6 for ; Fri, 7 Jul 2023 17:31:41 -0700 (PDT) Received: by mail-yb1-xb2e.google.com with SMTP id 3f1490d57ef6-bcb6dbc477eso2580596276.1 for ; Fri, 07 Jul 2023 17:31:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ttaylorr-com.20221208.gappssmtp.com; s=20221208; t=1688776300; x=1691368300; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=dVKKgF9DX6x4Og/MnOS+cwZ/ApmS72HDh15g3jGWP9s=; b=kxwWuIK0g+jFpDxRBIID3bLIWu6eUSJrrmXwoaOSMzeWiBXq3+29h91nDtcqe4QHVo UpPL/pAJxS5S+b4Ns1TE91sY1Z4Dq7pZScoQPYc5zSV9VOILt+RzNu1DCKWldUBo6iOE M2OENX/f8HUxzsiMAvwXzdscg5pywhXm+e1NJm0DR8hVD/X+Nt7L0Lo+eOy+TkoTMjs8 v5LkMxtB03oc4GeTcVTWa4mpo4sz12wUgK7D7piVMMJ1dflozX0Jcggpb+6ZuG1sJCtS P9jvrPZ7gxqX0aviw9mDARBhSAZQtVP0Hh1gx+kQDiMU1pYLwdssabNrvcsI0m8llNrV HB2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688776300; x=1691368300; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=dVKKgF9DX6x4Og/MnOS+cwZ/ApmS72HDh15g3jGWP9s=; b=Nvb+7xIfmvyiEGELsfgxaq7RyFH62RzMe95sajDmC/HgTkv4OMEFYDE4lyXY5ol+3R uwCjp1UHTyxJPDMHYgz12lo7GJDldbiTPbER/PUF2npFAHm3sghKxKkmGdBFGfyDzFtU NGyYjoO9oPA1F87UgzWJ1wANBHhhpWgn1GKgmlBIsodTloAkhGmDUWWzIOKb0K7x/6if ZGYVI7928CRLA0/xPyM665DsmUMNNn5nI85qilzTelZ7xLhOIvwgxZ9vfqjRBfGk30ZB A5jRMgOkn3OOXCkYgo97w5EqpooUtNVR4JW4T9Isuw9XB5M7PwhsmKKE1nkzpKVn6mse v+WA== X-Gm-Message-State: ABy/qLYEmu32pb0uBupmB+DHH51AWLOSZKqAJWiyO+rutBYcC7Ll+Jxj Oedws/A8OuHAe9tCtW74q+dNpeZ0afi1pZ2BaETf8A== X-Google-Smtp-Source: APBJJlGD8R4l1M/cikCJNaai5EhE2d9p9OiJMWx2XUmhM3bhXSd8qo5SACexQJNcRzTdrFbaFUc1pA== X-Received: by 2002:a0d:ea48:0:b0:577:60d4:a879 with SMTP id t69-20020a0dea48000000b0057760d4a879mr6108649ywe.33.1688776300693; Fri, 07 Jul 2023 17:31:40 -0700 (PDT) Received: from localhost (104-178-186-189.lightspeed.milwwi.sbcglobal.net. [104.178.186.189]) by smtp.gmail.com with ESMTPSA id a8-20020a816608000000b0057399b3bd26sm1409573ywc.33.2023.07.07.17.31.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jul 2023 17:31:40 -0700 (PDT) Date: Fri, 7 Jul 2023 20:31:39 -0400 From: Taylor Blau To: git@vger.kernel.org Cc: Junio C Hamano , Derrick Stolee Subject: [PATCH 4/6] commit-graph.c: iteratively verify commit-graph chains Message-ID: <4006bbf08548a8482d0aa4d4f3880de75ebf3c51.1688776280.git.me@ttaylorr.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Now that we have a function which can verify a single layer of a commit-graph chain, implement `verify_commit_graph()` in terms of iterating over commit-graphs along their `->base_graph` pointers. This further prepares us to consolidate the progress output of `git commit-graph verify`. Signed-off-by: Taylor Blau --- commit-graph.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/commit-graph.c b/commit-graph.c index 3d7cc11927d..3c29ea7c706 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -2707,10 +2707,11 @@ int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags) return 1; } - local_error = verify_one_commit_graph(r, g, flags); - - if (!(flags & COMMIT_GRAPH_VERIFY_SHALLOW) && g->base_graph) - local_error |= verify_commit_graph(r, g->base_graph, flags); + for (; g; g = g->base_graph) { + local_error |= verify_one_commit_graph(r, g, flags); + if (flags & COMMIT_GRAPH_VERIFY_SHALLOW) + break; + } return local_error; } From patchwork Sat Jul 8 00:31:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Blau X-Patchwork-Id: 13305462 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 874F1EB64D9 for ; Sat, 8 Jul 2023 00:31:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232874AbjGHAbu (ORCPT ); Fri, 7 Jul 2023 20:31:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232854AbjGHAbp (ORCPT ); Fri, 7 Jul 2023 20:31:45 -0400 Received: from mail-yw1-x112f.google.com (mail-yw1-x112f.google.com [IPv6:2607:f8b0:4864:20::112f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56F192689 for ; Fri, 7 Jul 2023 17:31:44 -0700 (PDT) Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-56fff21c2ebso29936797b3.3 for ; Fri, 07 Jul 2023 17:31:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ttaylorr-com.20221208.gappssmtp.com; s=20221208; t=1688776303; x=1691368303; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=P3Xk8tfrAmerZ9xdSqTtbEDSKEQBgzn10XeITkP40Sk=; b=JqFz14lYlZKbO1FRVfMBqHZHzv31zfSLkMLKfTe7xR1ngC+zFBEgL1fVeI+ro5FQFA zJb3d6i6UFbF0uiHGQqOX5QOkpf/UDAtRGaP0COjtUWjnk0g3VIpFfPHBc1Q1z9CJrBx R48YsaEQQOseYagc6fqW3fJRZw2fN8ynEz2FZWYtGEWV6JAt08qano/mv7VehmaeFAWj MuCE4fdcVJlRtCpsqEUPFboB2MHYbqQ2mUDjw6CMgHr0mUTO5xa6YUdRBzLjzwZHvY7a UJfMfYmPXggRwxVcWVvYRi/H73Mzod94Yw9O0/tzgrPBTKDgpxgEfJk+K8L0azx7T0s/ CvOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688776303; x=1691368303; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=P3Xk8tfrAmerZ9xdSqTtbEDSKEQBgzn10XeITkP40Sk=; b=LnAP0xxc4YbS7ZZDtv1tmRaDzWrp9xgPft90Kz9yXv5MD4pV6tAt399jldQVZEEeMy mFrSVtSmQLJJfEXXVHuhx0wK8WPk27sUnlnbVWP+jwB8KDYDOWzmtZMN1nU9hABEMDmP 7JWk9Ha48dgU5a6RPAQlpZFZZIuKOqAz/Xm//vkF8JZd/ucvNnjMMFa14XPwr9wFCPfk cRT3hdYl/isJx6ju8NLEx/9Ekjmr2SxL2QIUQlm+Oj4oF50YSfwECN6geh2t3/96/JD1 JvaFgKoZa4vKDqycJpKkY8vOIfGeSN7euIfknpyHL3lFSSJ2NAO7fpok/Fw+yrdbLZ2o kKBw== X-Gm-Message-State: ABy/qLbHnpNHqKPZv1m9tCwkYRGJV9xOdV/BFd+qWbDLrAS/EzbIyFwn R4LIPcWXZPn0I1a8g5LM5OcpsOX4HsqxptcRcSTwpw== X-Google-Smtp-Source: APBJJlHk7BY/pLlQYw2cl1u8jQYyu0R9ltEexbgbW2x5yY7XROYuP7UCdTpwt/Y0WxgCQ7Ef8DbGLQ== X-Received: by 2002:a81:6754:0:b0:577:65ea:78fb with SMTP id b81-20020a816754000000b0057765ea78fbmr7399683ywc.19.1688776303408; Fri, 07 Jul 2023 17:31:43 -0700 (PDT) Received: from localhost (104-178-186-189.lightspeed.milwwi.sbcglobal.net. [104.178.186.189]) by smtp.gmail.com with ESMTPSA id g187-20020a8152c4000000b0057a54615bf4sm1132805ywb.55.2023.07.07.17.31.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jul 2023 17:31:43 -0700 (PDT) Date: Fri, 7 Jul 2023 20:31:42 -0400 From: Taylor Blau To: git@vger.kernel.org Cc: Junio C Hamano , Derrick Stolee Subject: [PATCH 5/6] commit-graph.c: pass progress to `verify_one_commit_graph()` Message-ID: <60fc2899d867c9532b5e5f79c3fcd4614726b393.1688776280.git.me@ttaylorr.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org This is the final step to prepare for consolidating the output of `git commit-graph verify`. Instead of having each call to `verify_one_commit_graph()` initialize its own progress struct, have the caller pass one in instead. This patch does not alter the output of `git commit-graph verify`, but the next commit will consolidate the output. Signed-off-by: Taylor Blau --- commit-graph.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/commit-graph.c b/commit-graph.c index 3c29ea7c706..65dd4edf0e1 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -2544,12 +2544,11 @@ static int commit_graph_checksum_valid(struct commit_graph *g) static int verify_one_commit_graph(struct repository *r, struct commit_graph *g, - int flags) + struct progress *progress) { uint32_t i, cur_fanout_pos = 0; struct object_id prev_oid, cur_oid; int generation_zero = 0; - struct progress *progress = NULL; verify_commit_graph_error = verify_commit_graph_lite(g); if (verify_commit_graph_error) @@ -2600,10 +2599,6 @@ static int verify_one_commit_graph(struct repository *r, if (verify_commit_graph_error & ~VERIFY_COMMIT_GRAPH_ERROR_HASH) return verify_commit_graph_error; - if (flags & COMMIT_GRAPH_WRITE_PROGRESS) - progress = start_progress(_("Verifying commits in commit graph"), - g->num_commits); - for (i = 0; i < g->num_commits; i++) { struct commit *graph_commit, *odb_commit; struct commit_list *graph_parents, *odb_parents; @@ -2693,7 +2688,6 @@ static int verify_one_commit_graph(struct repository *r, graph_commit->date, odb_commit->date); } - stop_progress(&progress); return verify_commit_graph_error; } @@ -2708,9 +2702,16 @@ int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags) } for (; g; g = g->base_graph) { - local_error |= verify_one_commit_graph(r, g, flags); + struct progress *progress = NULL; + if (flags & COMMIT_GRAPH_WRITE_PROGRESS) + progress = start_progress(_("Verifying commits in commit graph"), + g->num_commits); + + local_error |= verify_one_commit_graph(r, g, progress); if (flags & COMMIT_GRAPH_VERIFY_SHALLOW) break; + + stop_progress(&progress); } return local_error; From patchwork Sat Jul 8 00:31:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Blau X-Patchwork-Id: 13305463 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EF29EB64DA for ; Sat, 8 Jul 2023 00:31:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232881AbjGHAb7 (ORCPT ); Fri, 7 Jul 2023 20:31:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232836AbjGHAbw (ORCPT ); Fri, 7 Jul 2023 20:31:52 -0400 Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A0151FEF for ; Fri, 7 Jul 2023 17:31:47 -0700 (PDT) Received: by mail-yb1-xb30.google.com with SMTP id 3f1490d57ef6-c11e2b31b95so2764680276.3 for ; Fri, 07 Jul 2023 17:31:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ttaylorr-com.20221208.gappssmtp.com; s=20221208; t=1688776306; x=1691368306; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=pAoObB6O5zDm5Zz7Y3UEnCaXUR8VFfPpX+eRjYZ+vtE=; b=Ig60hNiFyTJIysjYbbqHvvKtYWh1w5adZeZWS/b82+r1fXBgMa6T/tln46jgyM4neq xPIV1wDbWgdhSba2rP4vF52gPjWvay3EIJbJCEPnUgX08+7sfPKKcLU+NL1AYDk7pIHz s4kPLk68LQwxgadiCVKfbsIjhGWyvzk3XbbEhJFS6uTj+IGHo0UbBC3atOYm/BaSCmY9 G6fp2M6+AQcYN5rjB7e5uDo5oyxH5F42yRDD9yqMts3PWVn0Ni5wZBaH2tCoSk45zuIJ aRkIh40q5lc4zAvxTjgPZJaZQ6cxWklVgKXWxQDsQ+QqD4oxaDj0V06Ntf6yh3txyu6Q foUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688776306; x=1691368306; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=pAoObB6O5zDm5Zz7Y3UEnCaXUR8VFfPpX+eRjYZ+vtE=; b=e0gDl0l0d4kO9aO/3fz2B2LPMifxq50V3Xl8gOMkz8/HGdkFHXj47BKoaN5REnZ6yu rH/eu2RrwsHRIEvElHAlSP55IfJriBW5Ju0EQSeFWkENgZcV/JoxpSwzpXvxnGjyS9xh Qf1YTtkY1XTuR30MlD2nZSxxpjCd4JsCRb7KSk86znLNhbaxpc7VbSxJfBFW324XVT4R b7JZFcLcc89j3v1PApjjSqYThLMlgn0ergjj4PHUjSnByI1V7DOsMnj8doCYViLuYQ/2 7p5fmbCWyLu1R2Mj7QckpdUj8xMW6P+9n/H0gCW6nmziMHh8MzlHv1aRyJAMk/BVZAo/ nTUg== X-Gm-Message-State: ABy/qLaoOY3L8b7h3RIE7rRJwttlXTa1iRzrNcMm64u2gE4rvGKeU2Zx cTaMYFWgKRkAaaq71z7BrlOBdlXk6l8e7bhD6itsiw== X-Google-Smtp-Source: APBJJlFZY9dj7GdpkrMXk6MZC0duKHIUU0NAwQkNabWv74SsahgJFHPsSqkw/DoEdYT/rX+uqKxVCQ== X-Received: by 2002:a0d:e8c8:0:b0:576:896a:dbc5 with SMTP id r191-20020a0de8c8000000b00576896adbc5mr6230268ywe.48.1688776306443; Fri, 07 Jul 2023 17:31:46 -0700 (PDT) Received: from localhost (104-178-186-189.lightspeed.milwwi.sbcglobal.net. [104.178.186.189]) by smtp.gmail.com with ESMTPSA id b127-20020a816785000000b0057a44e20fb8sm1396280ywc.73.2023.07.07.17.31.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jul 2023 17:31:46 -0700 (PDT) Date: Fri, 7 Jul 2023 20:31:45 -0400 From: Taylor Blau To: git@vger.kernel.org Cc: Junio C Hamano , Derrick Stolee Subject: [PATCH 6/6] commit-graph.c: avoid duplicated progress output during `verify` Message-ID: <6eec849fa5aa734670bfcba359ad470efbaf383c.1688776280.git.me@ttaylorr.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org When `git commit-graph verify` was taught how to verify commit-graph chains in 3da4b609bb1 (commit-graph: verify chains with --shallow mode, 2019-06-18), it produced one line of progress per layer of the commit-graph chain. $ git.compile commit-graph verify Verifying commits in commit graph: 100% (4356/4356), done. Verifying commits in commit graph: 100% (131912/131912), done. This could be somewhat confusing to users, who may wonder why there are multiple occurrences of "Verifying commits in commit graph". There are likely good arguments on whether or not there should be one line of progress output per commit-graph layer. On the one hand, the existing output shows us verifying each individual layer of the chain. But on the other hand, the fact that a commit-graph may be stored among multiple layers is an implementation detail that the caller need not be aware of. Clarify this by showing a single progress meter regardless of the number of layers in the commit-graph chain. After this patch, the output reflects the logical contents of a commit-graph chain, instead of showing one line of output per commit-graph layer: $ git.compile commit-graph verify Verifying commits in commit graph: 100% (136268/136268), done. Signed-off-by: Taylor Blau --- commit-graph.c | 27 +++++++++++++++++---------- t/t5324-split-commit-graph.sh | 3 ++- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/commit-graph.c b/commit-graph.c index 65dd4edf0e1..ffcf548223f 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -2544,7 +2544,8 @@ static int commit_graph_checksum_valid(struct commit_graph *g) static int verify_one_commit_graph(struct repository *r, struct commit_graph *g, - struct progress *progress) + struct progress *progress, + uint64_t *seen) { uint32_t i, cur_fanout_pos = 0; struct object_id prev_oid, cur_oid; @@ -2605,7 +2606,7 @@ static int verify_one_commit_graph(struct repository *r, timestamp_t max_generation = 0; timestamp_t generation; - display_progress(progress, i + 1); + display_progress(progress, ++(*seen)); oidread(&cur_oid, g->chunk_oid_lookup + g->hash_len * i); graph_commit = lookup_commit(r, &cur_oid); @@ -2694,26 +2695,32 @@ static int verify_one_commit_graph(struct repository *r, int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags) { + struct progress *progress = NULL; int local_error = 0; + uint64_t seen = 0; if (!g) { graph_report("no commit-graph file loaded"); return 1; } + if (flags & COMMIT_GRAPH_WRITE_PROGRESS) { + uint64_t total = g->num_commits; + if (!(flags & COMMIT_GRAPH_VERIFY_SHALLOW)) + total += g->num_commits_in_base; + + progress = start_progress(_("Verifying commits in commit graph"), + total); + } + for (; g; g = g->base_graph) { - struct progress *progress = NULL; - if (flags & COMMIT_GRAPH_WRITE_PROGRESS) - progress = start_progress(_("Verifying commits in commit graph"), - g->num_commits); - - local_error |= verify_one_commit_graph(r, g, progress); + local_error |= verify_one_commit_graph(r, g, progress, &seen); if (flags & COMMIT_GRAPH_VERIFY_SHALLOW) break; - - stop_progress(&progress); } + stop_progress(&progress); + return local_error; } diff --git a/t/t5324-split-commit-graph.sh b/t/t5324-split-commit-graph.sh index 669ddc645fa..36c4141e67b 100755 --- a/t/t5324-split-commit-graph.sh +++ b/t/t5324-split-commit-graph.sh @@ -351,7 +351,8 @@ test_expect_success 'add octopus merge' ' git branch merge/octopus && git commit-graph write --reachable --split && git commit-graph verify --progress 2>err && - test_line_count = 3 err && + test_line_count = 1 err && + grep "Verifying commits in commit graph: 100% (18/18)" err && test_i18ngrep ! warning err && test_line_count = 3 $graphdir/commit-graph-chain '