From: Han Xin Date: Wed, 29 Jun 2022 02:08:49 GMT Subject: Re: Re: [PATCH v3 2/2] commit-graph.c: no lazy fetch in lookup_commit_in_graph() Message-ID: In-Reply-To: <220628.865yklgr6g.gmgdl@evledraar.gmail.com> On Tue, Jun 28, 2022 at 3:53 PM Ævar Arnfjörð Bjarmason wrote: > > + test_i18ngrep ! "fatal: promisor-remote: unable to fork off fetch subprocess" err && > > + test $(grep "fetch origin" trace | wc -l) -eq 1 > > > Use "grep", not "test_i18ngrep", and this should use "test_line_count". > > But actually better yet: this whole thing looks like it could use > "test_subcommand" instead, couldn't it? When using test_subcommand() we should give all the args, if we remove or add any args later, this test case will always pass even without this fix. So, is this test case still strict? run_with_limited_processses env GIT_TRACE2_EVENT="$(PWD)/trace.txt" \ git -C with-commit-graph fetch origin $anycommit && test_subcommand ! git -c fetch.negotiationAlgorithm=noop \ fetch origin --no-tags --no-write-fetch-head \ --recurse-submodules=no --filter=blob:none \ --stdin