All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Antonin Godard" <antonin.godard@bootlin.com>
To: "Konstantin Ryabitsev" <konstantin@linuxfoundation.org>
Cc: "Kernel.org Tools" <tools@kernel.org>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH b4 0/2] prep, diff: support overriding range-diff creation factor
Date: Fri, 07 Feb 2025 08:58:18 +0100	[thread overview]
Message-ID: <D7M1YG8MYLWO.K654XKU6IU0L@bootlin.com> (raw)
In-Reply-To: <20250206-dramatic-sparkling-millipede-a33bb0@meerkat>

Hi Konstantin,

On Thu Feb 6, 2025 at 7:09 PM CET, Konstantin Ryabitsev wrote:
> On Tue, Feb 04, 2025 at 05:44:15PM +0100, Antonin Godard wrote:
>> git range-diff allows to override the creation factor, which is
>> sometimes useful to adjust for seeing different diff outputs. This is
>> not possible with the current code, and is also not configurable from
>> git config.
>> 
>> Add an option to diff and prep to override the default creation factor
>> value.
>
> Does it make more sense to have a more generic way to provide arguments to
> pass to git-range-diff instead of duplicating options?
>
> E.g. something like:
>
>     b4 diff [...] --range-diff-opts="--creation-factor=80 --left-only"
>
> We'd have to re-parse them with shlex to make sure they are safe, but it seems
> like a better approach, no?

Right, did not think about it, but I like that approach too. It will avoid
having to make b4's options expand too much over time.

For shlex, were you thinking of shlex.quote()? Do you have any example in b4
that uses shlex for the same purpose?

I will try to work on that when I have some time, thanks for the suggestion!

Antonin

-- 
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

      reply	other threads:[~2025-02-07  7:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-04 16:44 [PATCH b4 0/2] prep, diff: support overriding range-diff creation factor Antonin Godard
2025-02-04 16:44 ` [PATCH b4 1/2] diff: add a creation factor argument Antonin Godard
2025-02-04 16:44 ` [PATCH b4 2/2] prep: add creation-factor argument Antonin Godard
2025-02-06 18:09 ` [PATCH b4 0/2] prep, diff: support overriding range-diff creation factor Konstantin Ryabitsev
2025-02-07  7:58   ` Antonin Godard [this message]

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=D7M1YG8MYLWO.K654XKU6IU0L@bootlin.com \
    --to=antonin.godard@bootlin.com \
    --cc=konstantin@linuxfoundation.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tools@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.