All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jacob Keller <jacob.e.keller@intel.com>
Cc: git@vger.kernel.org, Jacob Keller <jacob.keller@gmail.com>,
	Glen Choo <chooglen@google.com>
Subject: Re: [PATCH] blame: use different author name for fake commit generated by --contents
Date: Fri, 21 Apr 2023 16:34:24 -0700	[thread overview]
Message-ID: <xmqqbkjgizcv.fsf@gitster.g> (raw)
In-Reply-To: <20230421223013.467142-1-jacob.e.keller@intel.com> (Jacob Keller's message of "Fri, 21 Apr 2023 15:30:13 -0700")

Jacob Keller <jacob.e.keller@intel.com> writes:

> +test_expect_success 'blame working copy' '
> +	test_when_finished "git restore file" &&
> +	echo "1A quick brown fox jumps over" >file &&
> +	echo "another lazy dog" >> file &&

Lose the SP between ">>" redirection operator and its operand
"file".

So, we have "1A quick brown fox jumps over the" and "lazy dog"
in :file and HEAD:file, and both of these lines are different
in the working tree files as shown above.

> +	check_count A 1 "Not Committed Yet" 1

So why do we expect one is attributed to A while the other is
attributed to the working tree file?  Shouldn't we be expecting both
to be attributed to "Not Committed Yet"?

WIth this updated like the attached, 8001, 8002, and 8012 seem to
all pass (and without, they all fail).

 t/annotate-tests.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git c/t/annotate-tests.sh w/t/annotate-tests.sh
index 859693949b..4238ce45f8 100644
--- c/t/annotate-tests.sh
+++ w/t/annotate-tests.sh
@@ -74,8 +74,8 @@ test_expect_success 'blame 1 author' '
 
 test_expect_success 'blame working copy' '
 	test_when_finished "git restore file" &&
-	echo "1A quick brown fox jumps over" >file &&
-	echo "another lazy dog" >> file &&
+	echo "11A quick brown fox jumps over the" >file &&
+	echo "lazy dog" >>file &&
 	check_count A 1 "Not Committed Yet" 1
 '
 



  reply	other threads:[~2023-04-21 23:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21 22:30 [PATCH] blame: use different author name for fake commit generated by --contents Jacob Keller
2023-04-21 23:34 ` Junio C Hamano [this message]
2023-04-22  0:11   ` Jacob Keller
2023-04-24 16:05     ` Junio C Hamano
2023-04-24 17:59     ` Glen Choo
2023-04-24 18:37       ` Jacob Keller
2023-04-24 19:35 Jacob Keller
2023-04-24 19:36 ` Jacob Keller

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=xmqqbkjgizcv.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=chooglen@google.com \
    --cc=git@vger.kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=jacob.keller@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.