From: Jakub Narebski <jnareb@gmail.com>
To: "Matthias Andree" <matthias.andree@gmx.de>
Cc: "Jeff King" <peff@peff.net>, "Junio C Hamano" <gitster@pobox.com>,
git@vger.kernel.org, "Alex Riesen" <raa.lkml@gmail.com>,
"Brandon Casey" <casey@nrlssc.navy.mil>,
"Sverre Rabbelier" <srabbelier@gmail.com>
Subject: Re: git-tag bug? confusing git fast-export with double tag objects
Date: Fri, 15 May 2009 06:22:37 -0700 (PDT) [thread overview]
Message-ID: <m34ovmlcve.fsf@localhost.localdomain> (raw)
In-Reply-To: <op.uty0pjb51e62zd@balu>
"Matthias Andree" <matthias.andree@gmx.de> writes:
> Am 15.05.2009, 04:02 Uhr, schrieb Jeff King <peff@peff.net>:
>>> But what's the new signature or tag good for?
>>
>> Tagging a tag is good for saying something about the original tag, as
>> opposed to saying something about the commit that the original tag
>> points to.
>
> Yes, I agree to that since Junio's first reply.
>
> Clear reminder up front: this thread is *not* about tagging tagA with
> another tagB (I'll see if git fast-export has issues with that and
> perhaps concoct a test script), but this thread *is* about replacing
> tagA with itself.
>
> This raises semantic and hence usability concerns.
>
> So let's shift object relations aside for a while, no need to discuss
> what we agree about.
>
> Let's narrow down the discussion to signed tag objects (git tag -s/git
> tag -u GPG-ID). They are a bit different as there's some extended
> *meaning* that lies in the signature. I have no trouble with this. A
> <--signed-by--
> B is implemented by "git tag -s B A."
>
> Your example is:
>
> commit <--signed-by-- tag1 <--signed-by-- tag2.
>
> Tag2 is useful in an "approved by me, too" meaning or similar. Point taken.
>
> If I do "git tag -f -s -m three tag1 tag1" (as opposed to... tag2
> tag1), then I'll have trouble seeing or explaning the meaning or use
> cases of the result:
>
> commit <-- signed-by-- NIL (removed) <--signed-by-- tag1.
[...]
> For this particular corner case, "git tag -f tag tag" (where I really
> use the same tag name twice) could warn along the lines [...]
[cut]
THIS IS A FEATURE, NOT A BUG.
Please note that the name of tag (heavyweight tag, i.e. tag object)
is stored in two places: in the tag object itself as a contents of
'tag' header (you can see it in output of "git show <tag>" and also
in output of "git cat-file -p <tag>", where <tag> is heavyweight tag,
e.g. v1.6.3 in git.git repository), and also is default name of tag
reference (reference in "refs/tags/*" namespace) pointing to a tag
object.
So when you create signed tag 'A', you have the following situation
(assuming that it points at some commit)
35805ce <--- 5b7b4ead <=== refs/tags/A
(commit) tag A
(tag)
Please also note that "git tag -f A A" (notice the absence of options
forcing it to be an annotated tag) is a noop - it doesn't change the
situation.
If you do "git tag -f -s A A": note that you _force_ owerwriting a tag
(so git assumes that you know what you are doing), and that one of
-s / -a / -m options is used to force annotated tag (creation of tag
object), you will get the following situation
35805ce <--- 5b7b4ea <--- ada8ddc <=== refs/tags/A
(commit) tag A tag A
(tag) (tag)
What is unclear about this situation? How would you want to change it:
force user to use 'git tag -f -f' (I really know what I am doing)?
Note also that "git show A" would show the whole chain down to the
non-tag object...
Note also that the tag _reference_ (appropriate reference in the
"refs/tags/*" namespace) is purely _local_ matter; what one repository
has in 'refs/tags/v0.1.3', other can have in 'refs/tags/sub/v0.1.3'
for example.
--
Jakub Narebski
Poland
ShadeHawk on #git
next prev parent reply other threads:[~2009-05-15 13:23 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-14 0:53 git-tag bug? confusing git fast-export with double tag objects Matthias Andree
2009-05-14 2:13 ` Matthias Andree
2009-05-14 3:18 ` Junio C Hamano
2009-05-14 9:37 ` Matthias Andree
2009-05-14 12:00 ` Michael J Gruber
2009-05-14 12:16 ` Alex Riesen
2009-05-14 12:51 ` Matthias Andree
2009-05-14 13:16 ` Alex Riesen
2009-05-14 13:39 ` Matthias Andree
2009-05-14 13:42 ` Sverre Rabbelier
2009-05-14 18:02 ` Matthias Andree
2009-05-14 19:01 ` Brandon Casey
2009-05-14 18:22 ` Jeff King
2009-05-14 22:35 ` Matthias Andree
2009-05-15 2:02 ` Jeff King
2009-05-15 12:23 ` Matthias Andree
2009-05-15 13:22 ` Jakub Narebski [this message]
2009-05-15 14:54 ` Johannes Sixt
2009-05-15 15:51 ` Alex Riesen
2009-05-15 16:14 ` Matthias Andree
2009-05-15 16:21 ` Andreas Ericsson
2009-05-15 17:40 ` Junio C Hamano
2009-05-16 7:14 ` Andreas Ericsson
2009-05-16 7:56 ` Jakub Narebski
2009-05-16 8:02 ` Andreas Ericsson
2009-05-16 17:16 ` Junio C Hamano
2009-05-19 11:21 ` Matthias Andree
2009-05-19 11:29 ` Jeff King
2009-05-16 5:07 ` Jeff King
2009-05-15 16:00 ` Daniel Cheng
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=m34ovmlcve.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=casey@nrlssc.navy.mil \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=matthias.andree@gmx.de \
--cc=peff@peff.net \
--cc=raa.lkml@gmail.com \
--cc=srabbelier@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.