{"thread":{"id":"48564","subject":"\"man git-tag\" inconsistent about whether you can tag non-commit objects","startedAt":"2018-05-24T14:48:18Z","lastAt":"2018-05-25T09:42:19Z","messageCount":5,"participants":["Robert P. J. Day","Junio C Hamano","Ævar Arnfjörð Bjarmason"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"348432","messageId":"alpine.LFD.2.21.1805241040400.14773@localhost.localdomain","threadId":"48564","inReplyTo":null,"subject":"\"man git-tag\" inconsistent about whether you can tag non-commit objects","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2018-05-24T14:46:18Z","receivedAt":"2018-05-24T14:48:18Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"\n  embarrassed to admit i had no idea that you could tag non-commit\nobjects, only realized that when i was reading the man page and saw:\n\n  SYNOPSIS\n     git tag [-a | -s | -u <keyid>] [-f] [-m <msg> | -F <file>] [-e]\n           <tagname> [<commit> | <object>]\n                                 ^^^^^^^^\n\nso i tried it and, sure enough, i could tag a blob object. but if you\nread further into DESCRIPTION, about halfway through, you read:\n\n  \"Otherwise just a tag reference for the SHA-1 object name of the\n   commit object is created (i.e. a lightweight tag).\"\n   ^^^^^^\n\nwhich suggests only commit objects. finally, much further down, under\nOPTIONS:\n\n  \"<commit>, <object>\n     The object that the new tag will refer to, usually a commit.\n                                                ^^^^^^^^^^^^^^^^\n\nso to clean this up, is it sufficient to just change that middle line\nto say \"object\" rather than \"commit object\"? or is there more in the\nman page that needs tweaking?\n\nrday\n\n-- \n\n========================================================================\nRobert P. J. Day                                 Ottawa, Ontario, CANADA\n                  http://crashcourse.ca/dokuwiki\n\nTwitter:                                       http://twitter.com/rpjday\nLinkedIn:                               http://ca.linkedin.com/in/rpjday\n========================================================================\n\n\n"},{"id":"348506","messageId":"xmqqpo1kpl9i.fsf@gitster-ct.c.googlers.com","threadId":"48564","inReplyTo":"alpine.LFD.2.21.1805241040400.14773@localhost.localdomain","subject":"Re: \"man git-tag\" inconsistent about whether you can tag non-commit objects","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-05-25T01:38:33Z","receivedAt":"2018-05-25T01:38:45Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Robert P. J. Day\" <rpjday@crashcourse.ca> writes:\n\n>   embarrassed to admit i had no idea that you could tag non-commit\n> objects, only realized that when i was reading the man page and saw:\n>\n>   SYNOPSIS\n>      git tag [-a | -s | -u <keyid>] [-f] [-m <msg> | -F <file>] [-e]\n>            <tagname> [<commit> | <object>]\n>                                  ^^^^^^^^\n>\n> so i tried it and, sure enough, i could tag a blob object. but if you\n> read further into DESCRIPTION, about halfway through, you read:\n>\n>   \"Otherwise just a tag reference for the SHA-1 object name of the\n>    commit object is created (i.e. a lightweight tag).\"\n>    ^^^^^^\n>\n> which suggests only commit objects. finally, much further down, under\n> OPTIONS:\n>\n>   \"<commit>, <object>\n>      The object that the new tag will refer to, usually a commit.\n>                                                 ^^^^^^^^^^^^^^^^\n>\n> so to clean this up, is it sufficient to just change that middle line\n> to say \"object\" rather than \"commit object\"? or is there more in the\n> man page that needs tweaking?\n\nAs that sentence talks about a lightweight tag (i.e. a reference in\nrefs/tags/ hierarchy that directly points at an object of any kind),\nanother possibility would be to say\n\n\tOtherwise a tag reference that directly points at the given\n\tobject (i.e. lightweight tag) is created.\n\n\n\n"},{"id":"348522","messageId":"87muwo6uwq.fsf@evledraar.gmail.com","threadId":"48564","inReplyTo":"xmqqpo1kpl9i.fsf@gitster-ct.c.googlers.com","subject":"Re: \"man git-tag\" inconsistent about whether you can tag non-commit objects","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2018-05-25T07:45:09Z","receivedAt":"2018-05-25T07:45:15Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Fri, May 25 2018, Junio C Hamano wrote:\n\n> \"Robert P. J. Day\" <rpjday@crashcourse.ca> writes:\n>\n>>   embarrassed to admit i had no idea that you could tag non-commit\n>> objects, only realized that when i was reading the man page and saw:\n>>\n>>   SYNOPSIS\n>>      git tag [-a | -s | -u <keyid>] [-f] [-m <msg> | -F <file>] [-e]\n>>            <tagname> [<commit> | <object>]\n>>                                  ^^^^^^^^\n>>\n>> so i tried it and, sure enough, i could tag a blob object. but if you\n>> read further into DESCRIPTION, about halfway through, you read:\n>>\n>>   \"Otherwise just a tag reference for the SHA-1 object name of the\n>>    commit object is created (i.e. a lightweight tag).\"\n>>    ^^^^^^\n>>\n>> which suggests only commit objects. finally, much further down, under\n>> OPTIONS:\n>>\n>>   \"<commit>, <object>\n>>      The object that the new tag will refer to, usually a commit.\n>>                                                 ^^^^^^^^^^^^^^^^\n>>\n>> so to clean this up, is it sufficient to just change that middle line\n>> to say \"object\" rather than \"commit object\"? or is there more in the\n>> man page that needs tweaking?\n>\n> As that sentence talks about a lightweight tag (i.e. a reference in\n> refs/tags/ hierarchy that directly points at an object of any kind),\n> another possibility would be to say\n>\n> \tOtherwise a tag reference that directly points at the given\n> \tobject (i.e. lightweight tag) is created.\n\nRelated, this recent patch of mine:\nhttps://public-inbox.org/git/20180429202100.32353-6-avarab@gmail.com/#t\n\nI.e. might be worth talking about this briefly in the git-tag manpage as\nwell, i.e. that you can create a lightweight \"tag\" to a commit, but then\ndepending on where you push it it becomes either a branch or a tag,\nwhich may not be intuitive to users...\n"},{"id":"348525","messageId":"xmqqh8mwnmus.fsf@gitster-ct.c.googlers.com","threadId":"48564","inReplyTo":"87muwo6uwq.fsf@evledraar.gmail.com","subject":"Re: \"man git-tag\" inconsistent about whether you can tag non-commit objects","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-05-25T08:47:07Z","receivedAt":"2018-05-25T08:47:13Z","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>> As that sentence talks about a lightweight tag (i.e. a reference in\n>> refs/tags/ hierarchy that directly points at an object of any kind),\n>> another possibility would be to say\n>>\n>> \tOtherwise a tag reference that directly points at the given\n>> \tobject (i.e. lightweight tag) is created.\n>\n> Related, this recent patch of mine:\n> https://public-inbox.org/git/20180429202100.32353-6-avarab@gmail.com/#t\n>\n> I.e. might be worth talking about this briefly in the git-tag manpage as\n> well, i.e. that you can create a lightweight \"tag\" to a commit, but then\n> depending on where you push it it becomes either a branch or a tag,\n> which may not be intuitive to users...\n\nI am not sure if I agree.  People won't get confused, unless they\nthink too much and pedantically.\n\nIf you make refs/tags/$name point at a commit, it becomes a\nlightweight tag, if you make refs/heads/$name point at a commit,\nit becomes a local branch, if you make refs/remotes/$remote/$name\npoint at a commit, it behaves as a remote-tracking branch for the\nnamed $remote.  Anywhere else, it is just a random ref that happens\nto point at a commit.\n\nAnd notice that I never said \"push\" in the above.  The verb I used\nis \"make\" and that is deliberate.  It does not make any difference\nif you make such a ref point at a commit by pushing into a\nrepository, fetching from elsewhere, or running \"git branch\", \"git\ntag\", \"git update-ref\" locally.\n\n"},{"id":"348531","messageId":"alpine.LFD.2.21.1805250539580.7109@localhost.localdomain","threadId":"48564","inReplyTo":"xmqqpo1kpl9i.fsf@gitster-ct.c.googlers.com","subject":"Re: \"man git-tag\" inconsistent about whether you can tag non-commit objects","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2018-05-25T09:40:22Z","receivedAt":"2018-05-25T09:42:19Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"On Fri, 25 May 2018, Junio C Hamano wrote:\n\n> \"Robert P. J. Day\" <rpjday@crashcourse.ca> writes:\n>\n> >   embarrassed to admit i had no idea that you could tag non-commit\n> > objects, only realized that when i was reading the man page and saw:\n> >\n> >   SYNOPSIS\n> >      git tag [-a | -s | -u <keyid>] [-f] [-m <msg> | -F <file>] [-e]\n> >            <tagname> [<commit> | <object>]\n> >                                  ^^^^^^^^\n> >\n> > so i tried it and, sure enough, i could tag a blob object. but if you\n> > read further into DESCRIPTION, about halfway through, you read:\n> >\n> >   \"Otherwise just a tag reference for the SHA-1 object name of the\n> >    commit object is created (i.e. a lightweight tag).\"\n> >    ^^^^^^\n> >\n> > which suggests only commit objects. finally, much further down, under\n> > OPTIONS:\n> >\n> >   \"<commit>, <object>\n> >      The object that the new tag will refer to, usually a commit.\n> >                                                 ^^^^^^^^^^^^^^^^\n> >\n> > so to clean this up, is it sufficient to just change that middle line\n> > to say \"object\" rather than \"commit object\"? or is there more in the\n> > man page that needs tweaking?\n>\n> As that sentence talks about a lightweight tag (i.e. a reference in\n> refs/tags/ hierarchy that directly points at an object of any kind),\n> another possibility would be to say\n>\n> \tOtherwise a tag reference that directly points at the given\n> \tobject (i.e. lightweight tag) is created.\n\n  yup, that would resolve the issue. patch coming shortly.\n\nrday\n\n-- \n\n========================================================================\nRobert P. J. Day                                 Ottawa, Ontario, CANADA\n                  http://crashcourse.ca/dokuwiki\n\nTwitter:                                       http://twitter.com/rpjday\nLinkedIn:                               http://ca.linkedin.com/in/rpjday\n========================================================================\n"}]}