git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Mischa POSLAWSKY <git@shiar.nl>
Cc: git@vger.kernel.org, "Оля Тележная" <olyatelezhnaya@gmail.com>
Subject: Re: [PATCH] ref-filter: initialize empty name or email fields
Date: Wed, 21 Aug 2019 14:57:31 -0700	[thread overview]
Message-ID: <xmqq1rxerxkk.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <xmqqimqtxcou.fsf@gitster-ct.c.googlers.com> (Junio C. Hamano's message of "Mon, 19 Aug 2019 10:55:13 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> Mischa POSLAWSKY <git@shiar.nl> writes:
>
>> If I understand correctly, such tags cannot be produced normally anymore.
>> Therefore I'm unsure how to make tests, and if that is even warranted.
>
> Thanks for spotting.

A quick trial to recreate a tag object seems to succeed:

    $ git cat-file tag v0.99 |
    > sed -e '/-----BEGIN/,$d' |
    > git hash-object --stdin -w -t tag
    667d141b478eee5e53d2ee05acd61bb1f640249a
    $ git cat-file tag 667d141b47
    object a3eb250f996bf5e12376ec88622c4ccaabf20ea8
    type commit
    tag v0.99

    Test-release for wider distribution.

    I'll make the first public RPM's etc, thus the tag.

So we should be able to do something along the above line.  Here is
my quick-n-dirty one.

 t/t6300-for-each-ref.sh | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh
index ab69aa176d..b3a6b336fa 100755
--- a/t/t6300-for-each-ref.sh
+++ b/t/t6300-for-each-ref.sh
@@ -869,4 +869,16 @@ test_expect_success 'for-each-ref --ignore-case ignores case' '
 	test_cmp expect actual
 '
 
+test_expect_success 'show a taggerless tag' '
+	test_commit tagged &&
+	git tag -a -m "a normal tag" to-be-shown-0 HEAD &&
+	another=$(git cat-file tag to-be-shown-0 |
+		sed -e "/^tagger /d" \
+		    -e "/^tag to-be-shown/s/0/1/" \
+		    -e "s/a normal tag/a broken tag/" |
+		git hash-object --stdin -w -t tag) &&
+	git tag to-be-shown-1 $another &&
+	git for-each-ref --format="%(refname:short) %(taggername)" refs/tags/to-be-shown\*
+'
+
 test_done


  parent reply	other threads:[~2019-08-21 21:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-17 21:51 [PATCH] ref-filter: initialize empty name or email fields Mischa POSLAWSKY
2019-08-19 17:55 ` Junio C Hamano
2019-08-20 16:37   ` Junio C Hamano
2019-08-22 13:23     ` Mischa POSLAWSKY
2019-08-21 21:57   ` Junio C Hamano [this message]
2019-08-22 13:55     ` [PATCH 2/1] t6300: format missing tagger Mischa POSLAWSKY
2019-08-22 16:15       ` Junio C Hamano
2019-08-22 16:27         ` Mischa POSLAWSKY
2019-08-22 18:05           ` 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=xmqq1rxerxkk.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@shiar.nl \
    --cc=git@vger.kernel.org \
    --cc=olyatelezhnaya@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.
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).