git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Max Kirillov <max@max630.net>
To: Jeff King <peff@peff.net>, Eric Sunshine <sunshine@sunshineco.com>
Cc: Max Kirillov <max@max630.net>,
	Edmundo Carmona Antoranz <eantoranz@gmail.com>,
	Git List <git@vger.kernel.org>
Subject: [PATCH] blame: add test case for using tag object as a final ref
Date: Wed, 18 Nov 2015 07:36:32 +0200	[thread overview]
Message-ID: <1447824992-28520-1-git-send-email-max@max630.net> (raw)
In-Reply-To: 20151117232237.GA29014@sigill.intra.peff.net

It was discovered [1] that 1b0d40000a broke blaming starting from tag object.
Add test which verifies such blaming works.

[1] http://mid.gmane.org/20151117224809.GE27862@sigill.intra.peff.net

Signed-off-by: Max Kirillov <max@max630.net>
---
Thank you. Sorry, I should have noticed that obj ended up unused.

Adding test case for it. Looks ok after the fix.
 t/annotate-tests.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh
index b1673b3..093832f 100644
--- a/t/annotate-tests.sh
+++ b/t/annotate-tests.sh
@@ -68,6 +68,13 @@ test_expect_success 'blame 1 author' '
 	check_count A 2
 '
 
+test_expect_success 'blame by tag objects' '
+	git tag -m "test tag" testTag &&
+	git tag -m "test tag #2" testTag2 testTag &&
+	check_count -h testTag A 2 &&
+	check_count -h testTag2 A 2
+'
+
 test_expect_success 'setup B lines' '
 	echo "2A quick brown fox jumps over the" >>file &&
 	echo "lazy dog" >>file &&
-- 
2.3.4.2801.g3d0809b

             reply	other threads:[~2015-11-18  5:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-18  5:36 Max Kirillov [this message]
2015-11-18  6:00 ` [PATCH] blame: add test case for using tag object as a final ref Jeff King
  -- strict thread matches above, loose matches on Subject: below --
2015-11-18 10:35 Max Kirillov

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=1447824992-28520-1-git-send-email-max@max630.net \
    --to=max@max630.net \
    --cc=eantoranz@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=sunshine@sunshineco.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).