All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Phillip Wood <phillip.wood123@gmail.com>
Cc: Peter Hutterer <peter.hutterer@who-t.net>,
	 git@vger.kernel.org,  David Heidelberg <david@ixit.cz>,
	 Dragan Simic <dsimic@manjaro.org>
Subject: Re: [PATCH v3] diff: add diff.srcPrefix and diff.dstPrefix configuration variables
Date: Wed, 13 Mar 2024 08:29:20 -0700	[thread overview]
Message-ID: <xmqqbk7if8vj.fsf@gitster.g> (raw)
In-Reply-To: <f8565251-2af1-470b-9b2d-798e3504b0d1@gmail.com> (Phillip Wood's message of "Wed, 13 Mar 2024 15:04:14 +0000")

Phillip Wood <phillip.wood123@gmail.com> writes:

>> With a custom prefix those scripts will break, having an option that
>> forces the a/ and b/ prefix helps. Plus the man page explicitly says:
>>    Use the default source and destination prefixes ("a/" and "b/").
>> So let's stick with that behaviour then.
>
> As I understand it the purpose of --default-prefix is to override all
> the prefix related config settings so this seems like a very sensible
> choice.

It would be nice to update the description of '--default-prefix' so
that nobody has to say "As I understand it" anymore ;-)

As we are selling .{src,dst}Prefix as a thing that sets the default
prefix, we'd need to break the loop somehow, and "hardcoded" below
is my attempt to do so, but I am not sure if I succeeded.

 Documentation/diff-options.txt | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git c/Documentation/diff-options.txt w/Documentation/diff-options.txt
index aaaff0d46f..62eaa46d84 100644
--- c/Documentation/diff-options.txt
+++ w/Documentation/diff-options.txt
@@ -864,9 +864,10 @@ endif::git-format-patch[]
 	Do not show any source or destination prefix.
 
 --default-prefix::
-	Use the default source and destination prefixes ("a/" and "b/").
-	This is usually the default already, but may be used to override
-	config such as `diff.noprefix`.
+	Use the hardcoded default source and destination prefixes
+	("a/" and "b/").  This is designed to be used to override
+	configuration variables such as `diff.noprefix` and
+	`diff.srcPrefix`.
 
 --line-prefix=<prefix>::
 	Prepend an additional prefix to every line of output.

  reply	other threads:[~2024-03-13 15:29 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-11  2:32 [PATCH] diff: add diff.srcprefix and diff.dstprefix option support Peter Hutterer
2024-03-11 18:06 ` Junio C Hamano
2024-03-12  0:57   ` [PATCH v2] diff: add diff.srcprefix and diff.dstprefix configuration variables Peter Hutterer
2024-03-12 19:23     ` Junio C Hamano
2024-03-12 19:29       ` Dragan Simic
2024-03-12 23:15     ` [PATCH v3] diff: add diff.srcPrefix and diff.dstPrefix " Peter Hutterer
2024-03-13  2:15       ` Dragan Simic
2024-03-13  3:26         ` Dragan Simic
2024-03-13 15:06         ` Phillip Wood
2024-03-13 15:14           ` Dragan Simic
2024-03-13 15:24             ` Junio C Hamano
2024-03-13 15:28               ` Dragan Simic
2024-03-13 15:04       ` Phillip Wood
2024-03-13 15:29         ` Junio C Hamano [this message]
2024-03-13 16:18           ` Phillip Wood
2024-03-13 17:55             ` Junio C Hamano
2024-03-14  5:06               ` Peter Hutterer
2024-03-13 20:23           ` Dragan Simic
2024-03-15  1:03       ` [PATCH v4] " Peter Hutterer
2024-03-15  3:53         ` Dragan Simic
2024-03-15  5:54           ` [PATCH v5] " Peter Hutterer
2024-03-15  6:02             ` Dragan Simic
2024-03-15 17:00             ` Junio C Hamano
2024-03-15 19:13               ` Dragan Simic
2024-03-16  5:57               ` Junio C Hamano
2024-03-16  6:41                 ` Dragan Simic
2024-03-18  3:49                 ` Peter Hutterer
2024-03-18  4:39                   ` Junio C Hamano

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=xmqqbk7if8vj.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=david@ixit.cz \
    --cc=dsimic@manjaro.org \
    --cc=git@vger.kernel.org \
    --cc=peter.hutterer@who-t.net \
    --cc=phillip.wood123@gmail.com \
    /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.