git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Derrick Stolee <derrickstolee@github.com>
Cc: Abhradeep Chakraborty <chakrabortyabhradeep79@gmail.com>,
	git@vger.kernel.org,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH] partial-clone: add a partial-clone test case
Date: Mon, 14 Mar 2022 21:42:35 +0000	[thread overview]
Message-ID: <xmqqsfrknrck.fsf@gitster.g> (raw)
In-Reply-To: <e38ebbfd-3ce4-6900-97e4-74b987c08b7d@github.com> (Derrick Stolee's message of "Mon, 14 Mar 2022 12:25:41 -0400")

Derrick Stolee <derrickstolee@github.com> writes:

>> 	git -c fetch.negotiationAlgorithm=noop fetch origin --no-tags --no-write-fetch-head --recurse-submodules=no --filter=blob:none --stdin
>> 
>> Derrick told me to not depend on other flags like
>> `-c fetch.negotiationAlgorithm` etc. as they might be changed or omitted
>> and as it makes sense to me also. That's why I didn't specify those things.
>
> This reason is something that could be mentioned in the commit message
> to motivate the change to the helper.
>
>>> I wonder if it was more like this that the original wanted to grep for:
>>>
>>> 	grep '"event":"child_start".*\["git","pack-objects",.*\]'
>> 
>> I don't know about other cases, but in my case, atleast I really wanted
>> it.
>> 
>> So, In this scenerio, should I stick with `test_subcommand_inexact` or I
>> have to see other helper functions (or make my own) for it?
>
> As I mentioned earlier, it seems that
>
> 	test_subcommand_inexact ! git fetch
>
> would actually work for your needs without changing the helper. We will see
> whether or not the helper needs to be updated in a way that that line would
> not work anymore.

Ah, that is because the current implementation of the helper
sprinkles ".*" in between each and every pair of parameters, so the
resulting pattern \["git".*"fetch".*\] would not be prevented from
matching by the presence of "-c var.iable=value"?

In any case, the _inexact helper may need to be rethought, or at
least documented better what inexact-ness it wants to allow.  With
no concrete goals written down, my guess was that it wanted to
ensure only the earlier command names and options, while ignoring
the later arguments.  And that was where my "adding .* in between
looks wrong, and stripping trailing comma with ${expt%,} is nonsense"
comment came from.

Thanks.

  reply	other threads:[~2022-03-14 21:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-13 17:39 [PATCH] partial-clone: add a partial-clone test case Abhradeep Chakraborty via GitGitGadget
2022-03-13 19:41 ` Junio C Hamano
2022-03-14 15:46   ` Abhradeep Chakraborty
2022-03-14 16:25     ` Derrick Stolee
2022-03-14 21:42       ` Junio C Hamano [this message]
2022-03-15  8:20       ` Abhradeep Chakraborty
2022-03-14 21:35     ` Junio C Hamano
2022-03-14 16:24   ` Derrick Stolee
2022-03-14 22:21     ` Junio C Hamano
2022-03-15 11:30       ` Abhradeep Chakraborty
2022-03-15 12:57         ` Derrick Stolee
2022-03-15 15:15           ` Abhradeep Chakraborty
2022-03-15 16:13           ` Junio C Hamano
2022-03-16  8:06             ` Abhradeep Chakraborty
2022-03-16  9:46 ` [PATCH v2] " Abhradeep Chakraborty via GitGitGadget
2022-03-21 15:26   ` Derrick Stolee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqsfrknrck.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=chakrabortyabhradeep79@gmail.com \
    --cc=derrickstolee@github.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).