Re: Should GIT_AUTHOR_{NAME,EMAIL} set the tagger name/email?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 11, 2012, 16:53 UTC
- Message-ID
- <7vk3w0ijqx.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CACBZZX61pfus=coO4bh8LwKb578nrnL-gQqa_xQH__uqSe9fJA@mail.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 19 quoted lines
> On Sat, Sep 1, 2012 at 6:12 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>>
>>> I don't get what you mean, what committer info?
>>
>> GIT_COMMITTER_{NAME,EMAIL}. A tagger isn't really an author.
>
> Ah, am I the only one that finds that a bit counterintuitive to the
> point of wanting to submit a patch to change it?
>
> If you've created a tag you're the *author* of that tag, the
> author/committer distinction for commit objects is there for e.g.
> rebases and applying commits via e.g. git-am.
>
> We don't have a similar facility for tags (you have to push them
> around directly), but we *could* and in that case having a
> Tag-Committer as well well as a Tagger would make sense.
>
> Junio, what do you think?Unless your name is Linus Torvalds and it is early in year 2005, I wouldn't even think about it.
When we introduced "tagger name can be overriden with environment", we could have added GIT_TAGGER_{NAME,EMAIL}, but we didn't. Given that tagging happens far far less often than committing, I think it was a sensible thing to do.
It is a perfectly normal thing in Git for you to commit a patch authored by other people on behalf of them (and that is why AUTHOR exists as a separate name from the committer), but you still stand behind the commits you create by setting COMMITTER of them to you. The fact that it was _you_ who create the tag has similar weight that you have your name as the committer in commit objects, so in that sense, I think the semantics used for the name in tag is far closer to COMMITTER than AUTHOR.
I guess I wouldn't mind too much if "git tag" learned a "--tagger" option, and honored GIT_TAGGER_{NAME,EMAIL} if set (and otherwise, fall back to GIT_COMMITTER_{NAME,EMAIL}), but I do not know if it is worth it. How often would you want to _lie_ about your identity when you are tagging, and what legitimate reason do you have for doing so?