{"thread":{"id":"31404","subject":"Should GIT_AUTHOR_{NAME,EMAIL} set the tagger name/email?","startedAt":"2012-09-01T15:34:12Z","lastAt":"2012-09-11T16:58:22Z","messageCount":7,"participants":["Ævar Arnfjörð Bjarmason","Andreas Schwab","Junio C Hamano","demerphq"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"198193","messageId":"CACBZZX7Ud8Xx225ss6SYqZFXyW0FG2XJimBWdvW_NuMqn8yOnA@mail.gmail.com","threadId":"31404","inReplyTo":null,"subject":"Should GIT_AUTHOR_{NAME,EMAIL} set the tagger name/email?","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2012-09-01T15:34:12Z","receivedAt":"2012-09-01T15:34:12Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Maybe this is documented in some place I didn't spot, but I expected\nthat when I set GIT_AUTHOR_{NAME,EMAIL} it would affect the operation\nof git-tag, but it doesn't seem to. When I create tags it seems to\ncompletely ignore those variables.\n\nShould it be doing that? Here's a test script demonstrating the issue:\n\n    #!/bin/sh -e\n    # Set defaults\n    git config --global user.name \"Ævar Arnfjörð Bjarmason\"\n    git config --global user.email \"avarab@gmail.com\"\n\n    rm -rf /tmp/test-git\n    git init /tmp/test-git\n    cd /tmp/test-git\n\n    make_commit() {\n        file=$1\n        content=$2\n        echo $content >$file\n        git add $file\n        git commit -m\"$file: $content\" $file\n        git --no-pager log -1 HEAD | grep ^Author\n    }\n\n    make_commit README \"testing content\"\n    git config user.name \"Test User\"\n    git config user.email \"test@example.com\"\n    make_commit README \"testing content again\"\n    git tag -a -m\"annotated tag\" tag-name-1\n    git --no-pager show tag-name-1 | grep ^Author\n\n    GIT_AUTHOR_NAME=\"Tag Test User\"\nGIT_AUTHOR_EMAIL=\"tagtest@example.com\" git tag -a -m\"another annotated\ntag\" tag-name-2\n    git --no-pager show tag-name-2 | grep ^Author\n\nWhich outputs:\n\n    $ sh /tmp/test-tag.sh\n    Initialized empty Git repository in /tmp/test-git/.git/\n    [master (root-commit) 9816756] README: testing content\n     1 file changed, 1 insertion(+)\n     create mode 100644 README\n    Author: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n    [master 304b71e] README: testing content again\n     1 file changed, 1 insertion(+), 1 deletion(-)\n    Author: Test User <test@example.com>\n    Author: Test User <test@example.com>\n    Author: Test User <test@example.com>\n\nI'd expect references to \"Tag Test User <tagtest@example.com>\" for the\nsecond tag I created.\n"},{"id":"198194","messageId":"m2ehmlwxb2.fsf@igel.home","threadId":"31404","inReplyTo":"CACBZZX7Ud8Xx225ss6SYqZFXyW0FG2XJimBWdvW_NuMqn8yOnA@mail.gmail.com","subject":"Re: Should GIT_AUTHOR_{NAME,EMAIL} set the tagger name/email?","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2012-09-01T15:57:21Z","receivedAt":"2012-09-01T15:57:21Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n>     git --no-pager show tag-name-1 | grep ^Author\n\nA tag doesn't have an author, it has a tagger.  This shows the author of\nthe *commit*.\n\n>     GIT_AUTHOR_NAME=\"Tag Test User\"\n> GIT_AUTHOR_EMAIL=\"tagtest@example.com\" git tag -a -m\"another annotated\n> tag\" tag-name-2\n\nThe tagger is controlled by the committer info.\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"198195","messageId":"CACBZZX4Egrx_vrKNV68pL8DL4xkLd5j8o-1t4+fA7+Ai758-9g@mail.gmail.com","threadId":"31404","inReplyTo":"m2ehmlwxb2.fsf@igel.home","subject":"Re: Should GIT_AUTHOR_{NAME,EMAIL} set the tagger name/email?","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2012-09-01T16:06:47Z","receivedAt":"2012-09-01T16:06:47Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Sat, Sep 1, 2012 at 5:57 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:\n> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n>\n>>     git --no-pager show tag-name-1 | grep ^Author\n>\n> A tag doesn't have an author, it has a tagger.  This shows the author of\n> the *commit*.\n\nI got the grep wrong, I meant that I expected the tagger to be set\naccording to GIT_AUTHOR_{NAME,EMAIL}, but it isn't either:\n\n    $ sh /tmp/test-tag.sh\n    Initialized empty Git repository in /tmp/test-git/.git/\n    [master (root-commit) f83fc11] README: testing content\n     1 file changed, 1 insertion(+)\n     create mode 100644 README\n    Author: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n    [master ef65731] README: testing content again\n     1 file changed, 1 insertion(+), 1 deletion(-)\n    Author: Test User <test@example.com>\n    Tagger: Test User <test@example.com>\n    Author: Test User <test@example.com>\n    Tagger: Test User <test@example.com>\n    Author: Test User <test@example.com>\n\n>>     GIT_AUTHOR_NAME=\"Tag Test User\"\n>> GIT_AUTHOR_EMAIL=\"tagtest@example.com\" git tag -a -m\"another annotated\n>> tag\" tag-name-2\n>\n> The tagger is controlled by the committer info.\n\nI don't get what you mean, what committer info?\n"},{"id":"198196","messageId":"m2a9x9wwma.fsf@igel.home","threadId":"31404","inReplyTo":"CACBZZX4Egrx_vrKNV68pL8DL4xkLd5j8o-1t4+fA7+Ai758-9g@mail.gmail.com","subject":"Re: Should GIT_AUTHOR_{NAME,EMAIL} set the tagger name/email?","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2012-09-01T16:12:13Z","receivedAt":"2012-09-01T16:12:13Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n> I don't get what you mean, what committer info?\n\nGIT_COMMITTER_{NAME,EMAIL}.  A tagger isn't really an author.\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"198781","messageId":"CACBZZX61pfus=coO4bh8LwKb578nrnL-gQqa_xQH__uqSe9fJA@mail.gmail.com","threadId":"31404","inReplyTo":"m2a9x9wwma.fsf@igel.home","subject":"Re: Should GIT_AUTHOR_{NAME,EMAIL} set the tagger name/email?","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2012-09-11T14:56:27Z","receivedAt":"2012-09-11T14:56:27Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Sat, Sep 1, 2012 at 6:12 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:\n> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n>\n>> I don't get what you mean, what committer info?\n>\n> GIT_COMMITTER_{NAME,EMAIL}.  A tagger isn't really an author.\n\nAh, am I the only one that finds that a bit counterintuitive to the\npoint of wanting to submit a patch to change it?\n\nIf you've created a tag you're the *author* of that tag, the\nauthor/committer distinction for commit objects is there for e.g.\nrebases and applying commits via e.g. git-am.\n\nWe don't have a similar facility for tags (you have to push them\naround directly), but we *could* and in that case having a\nTag-Committer as well well as a Tagger would make sense.\n\nJunio, what do you think?\n"},{"id":"198797","messageId":"7vk3w0ijqx.fsf@alter.siamese.dyndns.org","threadId":"31404","inReplyTo":"CACBZZX61pfus=coO4bh8LwKb578nrnL-gQqa_xQH__uqSe9fJA@mail.gmail.com","subject":"Re: Should GIT_AUTHOR_{NAME,EMAIL} set the tagger name/email?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-09-11T16:53:26Z","receivedAt":"2012-09-11T16:53:26Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n> On Sat, Sep 1, 2012 at 6:12 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:\n>> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n>>\n>>> I don't get what you mean, what committer info?\n>>\n>> GIT_COMMITTER_{NAME,EMAIL}.  A tagger isn't really an author.\n>\n> Ah, am I the only one that finds that a bit counterintuitive to the\n> point of wanting to submit a patch to change it?\n>\n> If you've created a tag you're the *author* of that tag, the\n> author/committer distinction for commit objects is there for e.g.\n> rebases and applying commits via e.g. git-am.\n>\n> We don't have a similar facility for tags (you have to push them\n> around directly), but we *could* and in that case having a\n> Tag-Committer as well well as a Tagger would make sense.\n>\n> Junio, what do you think?\n\nUnless your name is Linus Torvalds and it is early in year 2005, I\nwouldn't even think about it.\n\nWhen we introduced \"tagger name can be overriden with environment\",\nwe could have added GIT_TAGGER_{NAME,EMAIL}, but we didn't.  Given\nthat tagging happens far far less often than committing, I think it\nwas a sensible thing to do.\n\nIt is a perfectly normal thing in Git for you to commit a patch\nauthored by other people on behalf of them (and that is why AUTHOR\nexists as a separate name from the committer), but you still stand\nbehind the commits you create by setting COMMITTER of them to you.\nThe fact that it was _you_ who create the tag has similar weight\nthat you have your name as the committer in commit objects, so in\nthat sense, I think the semantics used for the name in tag is far\ncloser to COMMITTER than AUTHOR.\n\nI guess I wouldn't mind too much if \"git tag\" learned a \"--tagger\"\noption, and honored GIT_TAGGER_{NAME,EMAIL} if set (and otherwise,\nfall back to GIT_COMMITTER_{NAME,EMAIL}), but I do not know if it is\nworth it.  How often would you want to _lie_ about your identity\nwhen you are tagging, and what legitimate reason do you have for\ndoing so?\n"},{"id":"198798","messageId":"CANgJU+UwR=UKHy8hnZhFRiaysjMaJpFO1M20DbRTCQN7GUpJQQ@mail.gmail.com","threadId":"31404","inReplyTo":"7vk3w0ijqx.fsf@alter.siamese.dyndns.org","subject":"Re: Should GIT_AUTHOR_{NAME,EMAIL} set the tagger name/email?","fromName":"demerphq","fromEmail":"demerphq@gmail.com","sentAt":"2012-09-11T16:58:22Z","receivedAt":"2012-09-11T16:58:22Z","isPatch":false,"sender":{"key":"demerphq@gmail.com","avatar":null},"body":"On 11 September 2012 18:53, Junio C Hamano <gitster@pobox.com> wrote:\n> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n>\n>> On Sat, Sep 1, 2012 at 6:12 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:\n>>> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n>>>\n>>>> I don't get what you mean, what committer info?\n>>>\n>>> GIT_COMMITTER_{NAME,EMAIL}.  A tagger isn't really an author.\n>>\n>> Ah, am I the only one that finds that a bit counterintuitive to the\n>> point of wanting to submit a patch to change it?\n>>\n>> If you've created a tag you're the *author* of that tag, the\n>> author/committer distinction for commit objects is there for e.g.\n>> rebases and applying commits via e.g. git-am.\n>>\n>> We don't have a similar facility for tags (you have to push them\n>> around directly), but we *could* and in that case having a\n>> Tag-Committer as well well as a Tagger would make sense.\n>>\n>> Junio, what do you think?\n>\n> Unless your name is Linus Torvalds and it is early in year 2005, I\n> wouldn't even think about it.\n>\n> When we introduced \"tagger name can be overriden with environment\",\n> we could have added GIT_TAGGER_{NAME,EMAIL}, but we didn't.  Given\n> that tagging happens far far less often than committing, I think it\n> was a sensible thing to do.\n>\n> It is a perfectly normal thing in Git for you to commit a patch\n> authored by other people on behalf of them (and that is why AUTHOR\n> exists as a separate name from the committer), but you still stand\n> behind the commits you create by setting COMMITTER of them to you.\n> The fact that it was _you_ who create the tag has similar weight\n> that you have your name as the committer in commit objects, so in\n> that sense, I think the semantics used for the name in tag is far\n> closer to COMMITTER than AUTHOR.\n>\n> I guess I wouldn't mind too much if \"git tag\" learned a \"--tagger\"\n> option, and honored GIT_TAGGER_{NAME,EMAIL} if set (and otherwise,\n> fall back to GIT_COMMITTER_{NAME,EMAIL}), but I do not know if it is\n> worth it.  How often would you want to _lie_ about your identity\n> when you are tagging, and what legitimate reason do you have for\n> doing so?\n\nInterestingly this came up because of the opposite problem. We wanted\nto *prevent* users from telling lies about who they are.\n\nIOW, when we do a rollout with git-deploy we want to automatically set\ntheir username from a secondary authenticated source before we create\na rollout tag in their name.\n\ncheers,\nYves\n\n\n\n\n-- \nperl -Mre=debug -e \"/just|another|perl|hacker/\"\n"}]}