git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Jeff King <peff@peff.net>, VenomVendor <info@venomvendor.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Phillip Wood <phillip.wood@dunelm.org.uk>,
	git@vger.kernel.org
Subject: Re: [PATCH 1/3] t3436: check --committer-date-is-author-date result more carefully
Date: Fri, 23 Oct 2020 11:10:18 +0100	[thread overview]
Message-ID: <845a14f1-5ce8-2c2f-a847-6d5d1550ba70@gmail.com> (raw)
In-Reply-To: <20201023070843.GA2913115@coredump.intra.peff.net>

Hi Peff

Thanks for fixing this embarrassing mistake and strengthening the tests, 
the first three patches look fine to me. We don't check the committer 
name and email in t4150-am.sh which we probably should do (the rebase 
tests were based on those) though that can wait as some of the rebase 
tests are testing the am implementation.

Thanks again

Phillip

On 23/10/2020 08:08, Jeff King wrote:
> After running "rebase --committer-date-is-author-date", we confirm that
> the committer date is the same as the author date. However, we don't
> look at any other parts of the committer ident line to make sure we
> didn't screw them up. And indeed, there are a few bugs here. Depending
> on the rebase backend in use, we may accidentally use the author email
> instead of the committer's, or even an empty string.
> 
> Let's teach our test_ctime_is_atime helper to check the committer name
> and email, which reveals several failing tests.
> 
> Signed-off-by: Jeff King <peff@peff.net>
> ---
>   t/t3436-rebase-more-options.sh | 14 +++++++-------
>   1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/t/t3436-rebase-more-options.sh b/t/t3436-rebase-more-options.sh
> index 996e82787e..6f2f49717b 100755
> --- a/t/t3436-rebase-more-options.sh
> +++ b/t/t3436-rebase-more-options.sh
> @@ -65,31 +65,31 @@ test_expect_success '--ignore-whitespace is remembered when continuing' '
>   '
>   
>   test_ctime_is_atime () {
> -	git log $1 --format=%ai >authortime &&
> -	git log $1 --format=%ci >committertime &&
> +	git log $1 --format="$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> %ai" >authortime &&
> +	git log $1 --format="%cn <%ce> %ci" >committertime &&
>   	test_cmp authortime committertime
>   }
>   
> -test_expect_success '--committer-date-is-author-date works with apply backend' '
> +test_expect_failure '--committer-date-is-author-date works with apply backend' '
>   	GIT_AUTHOR_DATE="@1234 +0300" git commit --amend --reset-author &&
>   	git rebase --apply --committer-date-is-author-date HEAD^ &&
>   	test_ctime_is_atime -1
>   '
>   
> -test_expect_success '--committer-date-is-author-date works with merge backend' '
> +test_expect_failure '--committer-date-is-author-date works with merge backend' '
>   	GIT_AUTHOR_DATE="@1234 +0300" git commit --amend --reset-author &&
>   	git rebase -m --committer-date-is-author-date HEAD^ &&
>   	test_ctime_is_atime -1
>   '
>   
> -test_expect_success '--committer-date-is-author-date works with rebase -r' '
> +test_expect_failure '--committer-date-is-author-date works with rebase -r' '
>   	git checkout side &&
>   	GIT_AUTHOR_DATE="@1234 +0300" git merge --no-ff commit3 &&
>   	git rebase -r --root --committer-date-is-author-date &&
>   	test_ctime_is_atime
>   '
>   
> -test_expect_success '--committer-date-is-author-date works when forking merge' '
> +test_expect_failure '--committer-date-is-author-date works when forking merge' '
>   	git checkout side &&
>   	GIT_AUTHOR_DATE="@1234 +0300" git merge --no-ff commit3 &&
>   	PATH="./test-bin:$PATH" git rebase -r --root --strategy=test \
> @@ -145,7 +145,7 @@ test_expect_success '--reset-author-date works with rebase -r' '
>   	test_atime_is_ignored
>   '
>   
> -test_expect_success '--reset-author-date with --committer-date-is-author-date works' '
> +test_expect_failure '--reset-author-date with --committer-date-is-author-date works' '
>   	test_must_fail git rebase -m --committer-date-is-author-date \
>   		--reset-author-date --onto commit2^^ commit2^ commit3 &&
>   	git checkout --theirs foo &&
> 


  reply	other threads:[~2020-10-23 10:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-23  5:48 committer-date-is-author-date flag removes email in "Commit" VenomVendor
2020-10-23  7:07 ` Jeff King
2020-10-23  7:08   ` [PATCH 1/3] t3436: check --committer-date-is-author-date result more carefully Jeff King
2020-10-23 10:10     ` Phillip Wood [this message]
2020-10-23  7:09   ` [PATCH 2/3] am: fix broken email with --committer-date-is-author-date Jeff King
2020-10-23  7:26     ` [PATCH 4/3] am, sequencer: stop parsing our own committer ident Jeff King
2020-10-23  7:45       ` Jeff King
2020-10-23 17:29         ` Taylor Blau
2020-10-26 16:25         ` Johannes Schindelin
2020-10-27  7:23           ` Jeff King
2020-10-23 14:06       ` Phillip Wood
2020-10-26 17:12       ` Junio C Hamano
2020-10-27  7:24         ` Jeff King
2020-10-23  7:10   ` [PATCH 3/3] rebase: fix broken email with --committer-date-is-author-date Jeff King
2020-10-23 15:23   ` committer-date-is-author-date flag removes email in "Commit" Junio C Hamano
2020-10-23 17:32     ` Phillip Wood
2020-10-23 17:59       ` 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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=845a14f1-5ce8-2c2f-a847-6d5d1550ba70@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=info@venomvendor.com \
    --cc=peff@peff.net \
    --cc=phillip.wood@dunelm.org.uk \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).