From: Peter Hutterer <peter.hutterer@who-t.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, David Heidelberg <david@ixit.cz>,
Phillip Wood <phillip.wood123@gmail.com>,
Dragan Simic <dsimic@manjaro.org>
Subject: Re: [PATCH v5] diff: add diff.srcPrefix and diff.dstPrefix configuration variables
Date: Mon, 18 Mar 2024 13:49:57 +1000 [thread overview]
Message-ID: <20240318034957.GA2935525@quokka> (raw)
In-Reply-To: <xmqq8r2ioh19.fsf@gitster.g>
On Fri, Mar 15, 2024 at 10:57:22PM -0700, Junio C Hamano wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
> > I am tempted to queue v4 with the z/ -> y/ fix from this round,
> > without any other changes from v4 to v5.
>
> So, that is what I did before I pushed out today's integration
> result. I however have an "after the dust settles" clean-up patch
> on top (not committed yet), which I am sending out for review.
>
> ------- >8 -------------- >8 -------------- >8 --------
> Subject: diff.*Prefix: use camelCase in the doc and test titles
>
> We added documentation for diff.srcPrefix and diff.dstPrefix with
> their names properly camelCased, but the diff.noPrefix is listed
> there in all lowercase. Also these configuration variables, both
> existing ones and the {src,dst}Prefix we recently added, were
> spelled in all lowercase in the tests in t4013.
>
> Now we are done with the main change, clean these up.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
And thanks for merging the patch!
Cheers,
Peter
> ---
>
> * If we were early in the review cycle, we would strongly prefer to
> do a "preliminary clean-up" followed by the main change, as the
> clean-up step would be much less controversial and can be queued
> earlier before the main change solidifies. But at v5 the main
> change is more or less perfect, so it is not worth rerolling to
> split the clean-up changes into preliminary ones and change to
> the main patch. So this is written as an "on top, after the dust
> settles" clean-up patch.
>
> Documentation/config/diff.txt | 2 +-
> t/t4013-diff-various.sh | 48 +++++++++++++++++++++----------------------
> 2 files changed, 25 insertions(+), 25 deletions(-)
>
> diff --git c/Documentation/config/diff.txt w/Documentation/config/diff.txt
> index fea89291c6..5ce7b91f1d 100644
> --- c/Documentation/config/diff.txt
> +++ w/Documentation/config/diff.txt
> @@ -108,7 +108,7 @@ diff.mnemonicPrefix::
> `git diff --no-index a b`;;
> compares two non-git things (1) and (2).
>
> -diff.noprefix::
> +diff.noPrefix::
> If set, 'git diff' does not show any source or destination prefix.
>
> diff.srcPrefix::
> diff --git c/t/t4013-diff-various.sh w/t/t4013-diff-various.sh
> index cfb5ad3d8d..3855d68dbc 100755
> --- c/t/t4013-diff-various.sh
> +++ w/t/t4013-diff-various.sh
> @@ -633,8 +633,8 @@ check_prefix () {
> test_cmp expect actual.paths
> }
>
> -test_expect_success 'diff-files does not respect diff.noprefix' '
> - git -c diff.noprefix diff-files -p >actual &&
> +test_expect_success 'diff-files does not respect diff.noPrefix' '
> + git -c diff.noPrefix diff-files -p >actual &&
> check_prefix actual a/file0 b/file0
> '
>
> @@ -643,58 +643,58 @@ test_expect_success 'diff-files respects --no-prefix' '
> check_prefix actual file0 file0
> '
>
> -test_expect_success 'diff respects diff.noprefix' '
> - git -c diff.noprefix diff >actual &&
> +test_expect_success 'diff respects diff.noPrefix' '
> + git -c diff.noPrefix diff >actual &&
> check_prefix actual file0 file0
> '
>
> -test_expect_success 'diff --default-prefix overrides diff.noprefix' '
> - git -c diff.noprefix diff --default-prefix >actual &&
> +test_expect_success 'diff --default-prefix overrides diff.noPrefix' '
> + git -c diff.noPrefix diff --default-prefix >actual &&
> check_prefix actual a/file0 b/file0
> '
>
> -test_expect_success 'diff respects diff.mnemonicprefix' '
> - git -c diff.mnemonicprefix diff >actual &&
> +test_expect_success 'diff respects diff.mnemonicPrefix' '
> + git -c diff.mnemonicPrefix diff >actual &&
> check_prefix actual i/file0 w/file0
> '
>
> -test_expect_success 'diff --default-prefix overrides diff.mnemonicprefix' '
> - git -c diff.mnemonicprefix diff --default-prefix >actual &&
> +test_expect_success 'diff --default-prefix overrides diff.mnemonicPrefix' '
> + git -c diff.mnemonicPrefix diff --default-prefix >actual &&
> check_prefix actual a/file0 b/file0
> '
>
> -test_expect_success 'diff respects diff.srcprefix' '
> - git -c diff.srcprefix=x/ diff >actual &&
> +test_expect_success 'diff respects diff.srcPrefix' '
> + git -c diff.srcPrefix=x/ diff >actual &&
> check_prefix actual x/file0 b/file0
> '
>
> -test_expect_success 'diff respects diff.dstprefix' '
> - git -c diff.dstprefix=y/ diff >actual &&
> +test_expect_success 'diff respects diff.dstPrefix' '
> + git -c diff.dstPrefix=y/ diff >actual &&
> check_prefix actual a/file0 y/file0
> '
>
> -test_expect_success 'diff --src-prefix overrides diff.srcprefix' '
> - git -c diff.srcprefix=y/ diff --src-prefix=z/ >actual &&
> +test_expect_success 'diff --src-prefix overrides diff.srcPrefix' '
> + git -c diff.srcPrefix=y/ diff --src-prefix=z/ >actual &&
> check_prefix actual z/file0 b/file0
> '
>
> -test_expect_success 'diff --dst-prefix overrides diff.dstprefix' '
> - git -c diff.dstprefix=y/ diff --dst-prefix=z/ >actual &&
> +test_expect_success 'diff --dst-prefix overrides diff.dstPrefix' '
> + git -c diff.dstPrefix=y/ diff --dst-prefix=z/ >actual &&
> check_prefix actual a/file0 z/file0
> '
>
> -test_expect_success 'diff.{src,dst}prefix ignored with diff.noprefix' '
> - git -c diff.dstprefix=y/ -c diff.srcprefix=x/ -c diff.noprefix diff >actual &&
> +test_expect_success 'diff.{src,dst}Prefix ignored with diff.noPrefix' '
> + git -c diff.dstPrefix=y/ -c diff.srcPrefix=x/ -c diff.noPrefix diff >actual &&
> check_prefix actual file0 file0
> '
>
> -test_expect_success 'diff.{src,dst}prefix ignored with diff.mnemonicprefix' '
> - git -c diff.dstprefix=x/ -c diff.srcprefix=y/ -c diff.mnemonicprefix diff >actual &&
> +test_expect_success 'diff.{src,dst}Prefix ignored with diff.mnemonicPrefix' '
> + git -c diff.dstPrefix=x/ -c diff.srcPrefix=y/ -c diff.mnemonicPrefix diff >actual &&
> check_prefix actual i/file0 w/file0
> '
>
> -test_expect_success 'diff.{src,dst}prefix ignored with --default-prefix' '
> - git -c diff.dstprefix=x/ -c diff.srcprefix=y/ diff --default-prefix >actual &&
> +test_expect_success 'diff.{src,dst}Prefix ignored with --default-prefix' '
> + git -c diff.dstPrefix=x/ -c diff.srcPrefix=y/ diff --default-prefix >actual &&
> check_prefix actual a/file0 b/file0
> '
>
next prev parent reply other threads:[~2024-03-18 3:50 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
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 [this message]
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=20240318034957.GA2935525@quokka \
--to=peter.hutterer@who-t.net \
--cc=david@ixit.cz \
--cc=dsimic@manjaro.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--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 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).