Re: Re: [PATCH v3 2/2] commit-graph.c: no lazy fetch in lookup_commit_in_graph()
- From
Han Xin <hanxin.hx@bytedance.com>
- Date
- Jun 29, 2022, 02:08 UTC
- Message-ID
- <CAKgqsWXawRg6DgvORs709YSsQFqKgiQ=u2LN8Fx3LVXdfbJAag@mail.gmail.com>
- In-Reply-To
- <220628.865yklgr6g.gmgdl@evledraar.gmail.com>
On Tue, Jun 28, 2022 at 3:53 PM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 8 quoted lines
> > + 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 <trace.txt