{"thread":{"id":"33365","subject":"[PATCH] git-tag(1): we tag HEAD by default","startedAt":"2013-04-03T14:27:14Z","lastAt":"2013-04-03T18:21:56Z","messageCount":8,"participants":["Thomas Rast","Junio C Hamano","Yann Droneaud"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"213034","messageId":"137ebfa428b16497287c55e552372df1087f1588.1364999181.git.trast@inf.ethz.ch","threadId":"33365","inReplyTo":null,"subject":"[PATCH] git-tag(1): we tag HEAD by default","fromName":"Thomas Rast","fromEmail":"trast@inf.ethz.ch","sentAt":"2013-04-03T14:27:14Z","receivedAt":"2013-04-03T14:27:14Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"The <commit>|<object> argument is actually not explained anywhere\n(except implicitly in the description of an unannotated tag).  Write a\nlittle explanation, in particular to cover the default.\n\nSigned-off-by: Thomas Rast <trast@inf.ethz.ch>\n---\n\nPrompted by a question on IRC about the default value.  Do we actually\nread our own docs? ;-)\n\n Documentation/git-tag.txt | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt\nindex e3032c4..697df50 100644\n--- a/Documentation/git-tag.txt\n+++ b/Documentation/git-tag.txt\n@@ -126,6 +126,11 @@ This option is only applicable when listing tags without annotation lines.\n \tlinkgit:git-check-ref-format[1].  Some of these checks\n \tmay restrict the characters allowed in a tag name.\n \n+<commit>, <object>::\n+\tThe object that the new tag will refer to, usually a commit.\n+\tDefaults to HEAD.\n+\n+\n CONFIGURATION\n -------------\n By default, 'git tag' in sign-with-default mode (-s) will use your\n-- \n1.8.2.548.g7173465\n"},{"id":"213041","messageId":"7vzjxf64gn.fsf@alter.siamese.dyndns.org","threadId":"33365","inReplyTo":"137ebfa428b16497287c55e552372df1087f1588.1364999181.git.trast@inf.ethz.ch","subject":"Re: [PATCH] git-tag(1): we tag HEAD by default","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-04-03T15:04:08Z","receivedAt":"2013-04-03T15:04:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thomas Rast <trast@inf.ethz.ch> writes:\n\n> The <commit>|<object> argument is actually not explained anywhere\n> (except implicitly in the description of an unannotated tag).  Write a\n> little explanation, in particular to cover the default.\n>\n> Signed-off-by: Thomas Rast <trast@inf.ethz.ch>\n> ---\n>\n> Prompted by a question on IRC about the default value.  Do we actually\n> read our own docs? ;-)\n\nPerhaps among us some of them are real men ;-)\n\n>  Documentation/git-tag.txt | 5 +++++\n>  1 file changed, 5 insertions(+)\n>\n> diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt\n> index e3032c4..697df50 100644\n> --- a/Documentation/git-tag.txt\n> +++ b/Documentation/git-tag.txt\n> @@ -126,6 +126,11 @@ This option is only applicable when listing tags without annotation lines.\n>  \tlinkgit:git-check-ref-format[1].  Some of these checks\n>  \tmay restrict the characters allowed in a tag name.\n>  \n> +<commit>, <object>::\n> +\tThe object that the new tag will refer to, usually a commit.\n> +\tDefaults to HEAD.\n\nShouldn't this be more like this:\n\n    <commit>::\n    <object>::\n\tYour explanation here...\n\nOther than that, I think this is a reasonable change.\nThanks.\n\n> +\n> +\n>  CONFIGURATION\n>  -------------\n>  By default, 'git tag' in sign-with-default mode (-s) will use your\n"},{"id":"213043","messageId":"877gkjvecg.fsf@linux-k42r.v.cablecom.net","threadId":"33365","inReplyTo":"7vzjxf64gn.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] git-tag(1): we tag HEAD by default","fromName":"Thomas Rast","fromEmail":"trast@inf.ethz.ch","sentAt":"2013-04-03T15:11:27Z","receivedAt":"2013-04-03T15:11:27Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Thomas Rast <trast@inf.ethz.ch> writes:\n>\n>> +<commit>, <object>::\n>> +\tThe object that the new tag will refer to, usually a commit.\n>> +\tDefaults to HEAD.\n>\n> Shouldn't this be more like this:\n>\n>     <commit>::\n>     <object>::\n> \tYour explanation here...\n\nHmm, you're right, but we seem to be fairly inconsistent in that\ndepartment.  There are some instances with the comma style:\n\n  $ git grep ',.*::$' Documentation/*.txt\n  Documentation/blame-options.txt:-L <start>,<end>, -L :<regex>::                                        \n  Documentation/config.txt:gitcvs.dbuser, gitcvs.dbpass::                                                \n  Documentation/config.txt:http.lowSpeedLimit, http.lowSpeedTime::                                       \n  Documentation/diff-options.txt:--stat[=<width>[,<name-width>[,<count>]]]::                             \n  Documentation/diff-options.txt:--dirstat[=<param1,param2,...>]::                                       \n  Documentation/git-add.txt:-e, \\--edit::                                                                \n  Documentation/git-check-attr.txt:-a, --all::                                                           \n  Documentation/git-check-ignore.txt:-q, --quiet::                                                       \n  Documentation/git-check-ignore.txt:-v, --verbose::                                                     \n  Documentation/git-index-pack.txt:--index-version=<version>[,<offset>]::                                \n  Documentation/git-log.txt:-L <start>,<end>:<file>, -L :<regex>:<file>::                                \n  Documentation/git-log.txt:git log -L '/int main/',/^}/:main.c::                                        \n  Documentation/git-p4.txt:--verbose, -v::                                                               \n  Documentation/git-p4.txt:--dry-run, -n::                                                               \n  Documentation/git-p4.txt:\"//depot/my/project@1,6\"::                                                    \n  Documentation/git-pack-objects.txt:--index-version=<version>[,<offset>]::                              \n  Documentation/git-remote-fd.txt:`git push fd::7,8 master (as URL)`::                                   \n  Documentation/git-remote-fd.txt:`git push fd::7,8/bar master`::\n  Documentation/git-reset.txt:Undo a commit, making it a topic branch::\n  Documentation/git-shortlog.txt:-w[<width>[,<indent1>[,<indent2>]]]::\n  Documentation/git-show-branch.txt:--reflog[=<n>[,<base>]] [<ref>]::\n  Documentation/git-tag.txt:<commit>, <object>::\n  Documentation/revisions.txt:'<sha1>', e.g. 'dae86e1950b1277e545cee180551750029cfe735', 'dae86e'::\n  Documentation/revisions.txt:'<describeOutput>', e.g. 'v1.7.4.2-679-g3bee7fb'::\n  Documentation/revisions.txt:'<refname>', e.g. 'master', 'heads/master', 'refs/heads/master'::\n  Documentation/revisions.txt:'<refname>@\\{<date>\\}', e.g. 'master@\\{yesterday\\}', 'HEAD@\\{5 minutes ago\\\n  Documentation/revisions.txt:'<refname>@\\{<n>\\}', e.g. 'master@\\{1\\}'::\n  Documentation/revisions.txt:'@\\{<n>\\}', e.g. '@\\{1\\}'::\n  Documentation/revisions.txt:'@\\{-<n>\\}', e.g. '@\\{-1\\}'::\n  Documentation/revisions.txt:'<branchname>@\\{upstream\\}', e.g. 'master@\\{upstream\\}', '@\\{u\\}'::\n  Documentation/revisions.txt:'<rev>{caret}', e.g. 'HEAD{caret}, v1.5.1{caret}0'::\n  Documentation/revisions.txt:'<rev>{tilde}<n>', e.g. 'master{tilde}3'::\n  Documentation/revisions.txt:'<rev>{caret}\\{<type>\\}', e.g. 'v0.99.8{caret}\\{commit\\}'::\n  Documentation/revisions.txt:'<rev>{caret}\\{\\}', e.g. 'v0.99.8{caret}\\{\\}'::\n  Documentation/revisions.txt:'<rev>{caret}\\{/<text>\\}', e.g. 'HEAD^{/fix nasty bug}'::\n  Documentation/revisions.txt:':/<text>', e.g. ':/fix nasty bug'::\n  Documentation/revisions.txt:'<rev>:<path>', e.g. 'HEAD:README', ':README', 'master:./README'::\n  Documentation/revisions.txt:':<n>:<path>', e.g. ':0:README', ':README'::\n  Documentation/revisions.txt:'<rev>{caret}@', e.g. 'HEAD{caret}@'::\n  Documentation/revisions.txt:'<rev>{caret}!', e.g. 'HEAD{caret}!'::\n\nBut the majority uses the two-line style:\n\n  $ git grep -A1 '::$' Documentation/*.txt | egrep '^--$|::$' | perl -ne '$lastbreak=$. if /^--/; if ($lastbreak<$.-1) {print \"$last$_\"; $last=\"\";} else {$last=$_;}'\n  Documentation/blame-options.txt:-p::\n  Documentation/blame-options.txt:--porcelain::\n  Documentation/config.txt:add.ignore-errors::\n  Documentation/config.txt:add.ignoreErrors::\n  Documentation/config.txt:format.to::\n  Documentation/config.txt:format.cc::\n  Documentation/config.txt:gc.reflogexpire::\n  Documentation/config.txt:gc.<pattern>.reflogexpire::\n  Documentation/config.txt:gc.reflogexpireunreachable::\n  Documentation/config.txt:gc.<ref>.reflogexpireunreachable::\n  Documentation/config.txt:gitweb.category::\n  Documentation/config.txt:gitweb.description::\n  [snip 800+ more lines]\n\nShould we fix that?\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"213045","messageId":"7vvc8363v7.fsf@alter.siamese.dyndns.org","threadId":"33365","inReplyTo":"877gkjvecg.fsf@linux-k42r.v.cablecom.net","subject":"Re: [PATCH] git-tag(1): we tag HEAD by default","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-04-03T15:17:00Z","receivedAt":"2013-04-03T15:17:00Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thomas Rast <trast@inf.ethz.ch> writes:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n>> Thomas Rast <trast@inf.ethz.ch> writes:\n>>\n>>> +<commit>, <object>::\n>>> +\tThe object that the new tag will refer to, usually a commit.\n>>> +\tDefaults to HEAD.\n>>\n>> Shouldn't this be more like this:\n>>\n>>     <commit>::\n>>     <object>::\n>> \tYour explanation here...\n>\n> Hmm, you're right, but we seem to be fairly inconsistent in that\n> department.  There are some instances with the comma style:\n\nThat is because we did not know better in the olden days, until\nsomebody noticed and started using the separate-line form.  We might\nhave a patch or two to only convert from the comma-style but I do\nnot recall us doing a whole-tree style clean-ups.\n\n> Should we fix that?\n\nI personally do not think the churn is warranted.  \"Fix the existing\nones you notice as you touch the vicinity, and avoid introducing new\nones\" is good enough.\n"},{"id":"213046","messageId":"3b24bc742b9738531d707932a9775c98@meuh.org","threadId":"33365","inReplyTo":"137ebfa428b16497287c55e552372df1087f1588.1364999181.git.trast@inf.ethz.ch","subject":"Re: [PATCH] git-tag(1): we tag HEAD by default","fromName":"Yann Droneaud","fromEmail":"ydroneaud@opteya.com","sentAt":"2013-04-03T15:18:09Z","receivedAt":"2013-04-03T15:18:09Z","isPatch":true,"sender":{"key":"ydroneaud@opteya.com","avatar":"https://avatars.githubusercontent.com/u/881377?v=4"},"body":"Hi,\n\nLe 03.04.2013 16:27, Thomas Rast a écrit :\n> The <commit>|<object> argument is actually not explained anywhere\n> (except implicitly in the description of an unannotated tag).  Write \n> a\n> little explanation, in particular to cover the default.\n\n> +<commit>, <object>::\n> +\tThe object that the new tag will refer to, usually a commit.\n> +\tDefaults to HEAD.\n> +\n> +\n\nThis puzzled me a lot, so I try various configuration:\n- I was able to create an annotated tag on an annotated tag (this can \nbe recursively)\n\n   git tag -a -m \"tagged a tag\" test_tag_tag v1.8.2\n   git show test_tag_tag\n\n- I was able to tag a file\n\n   git tag -a -m \"tagged a file\" test_tag_file `git ls-tree HEAD | awk \n'{ print $3; exit; }'`\n   git show test_tag_file\n   git show -p test_tag_file\n\n\nIs there any other kind of object that can be tagged ... and what is \nthe purpose of this ?\n\n\nRegards.\n\n-- \nYann Droneaud\nOPTEYA\n"},{"id":"213047","messageId":"87k3ojtz9n.fsf@linux-k42r.v.cablecom.net","threadId":"33365","inReplyTo":"3b24bc742b9738531d707932a9775c98@meuh.org","subject":"Re: [PATCH] git-tag(1): we tag HEAD by default","fromName":"Thomas Rast","fromEmail":"trast@inf.ethz.ch","sentAt":"2013-04-03T15:22:28Z","receivedAt":"2013-04-03T15:22:28Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Yann Droneaud <ydroneaud@opteya.com> writes:\n\n> Hi,\n>\n> Le 03.04.2013 16:27, Thomas Rast a écrit :\n>> +<commit>, <object>::\n>> +\tThe object that the new tag will refer to, usually a commit.\n>> +\tDefaults to HEAD.\n> \n> Is there any other kind of object that can be tagged ... and what is\n> the purpose of this ?\n\nAny object type, including tags.  Signed tags of other tags probably\nmake sense if you want to express extra approval on top of the original\nsignature.\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"213056","messageId":"7v7gkj5vcm.fsf@alter.siamese.dyndns.org","threadId":"33365","inReplyTo":"877gkjvecg.fsf@linux-k42r.v.cablecom.net","subject":"Re: [PATCH] git-tag(1): we tag HEAD by default","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-04-03T18:20:57Z","receivedAt":"2013-04-03T18:20:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thomas Rast <trast@inf.ethz.ch> writes:\n\n> There are some instances with the comma style:\n>\n>   $ git grep ',.*::$' Documentation/*.txt\n>   Documentation/blame-options.txt:-L <start>,<end>, -L :<regex>::\n>   Documentation/config.txt:gitcvs.dbuser, gitcvs.dbpass::\n>   Documentation/config.txt:http.lowSpeedLimit, http.lowSpeedTime::\n>   Documentation/git-add.txt:-e, \\--edit::\n>   Documentation/git-check-attr.txt:-a, --all::\n>   Documentation/git-check-ignore.txt:-q, --quiet::\n>   Documentation/git-check-ignore.txt:-v, --verbose::\n>   Documentation/git-log.txt:-L <start>,<end>:<file>, -L :<regex>:<file>::\n>   Documentation/git-p4.txt:--verbose, -v::\n>   Documentation/git-p4.txt:--dry-run, -n::\n>   Documentation/git-tag.txt:<commit>, <object>::\n\nThe above are clearly candidate for clean-ups (the last one is your\nmaking I already killed in this thread, isn't it?).\n\nThese are false matches, I think.\n\n>   Documentation/diff-options.txt:--stat[=<width>[,<name-width>[,<count>]]]::\n>   Documentation/diff-options.txt:--dirstat[=<param1,param2,...>]::\n>   Documentation/git-index-pack.txt:--index-version=<version>[,<offset>]::\n>   Documentation/git-log.txt:git log -L '/int main/',/^}/:main.c::\n>   Documentation/git-p4.txt:\"//depot/my/project@1,6\"::\n>   Documentation/git-pack-objects.txt:--index-version=<version>[,<offset>]::\n>   Documentation/git-remote-fd.txt:`git push fd::7,8 master (as URL)`::\n>   Documentation/git-remote-fd.txt:`git push fd::7,8/bar master`::\n>   Documentation/git-reset.txt:Undo a commit, making it a topic branch::\n>   Documentation/git-shortlog.txt:-w[<width>[,<indent1>[,<indent2>]]]::\n>   Documentation/git-show-branch.txt:--reflog[=<n>[,<base>]] [<ref>]::\n\nI am not sure about these \"A, e.g. B, C::\" entries.  I tend to think\nthat they are all logically a single entry, that happen to have\ncommas in their entry heading, and fall into the same \"false\nmatches\" category as above.\n\n>   Documentation/revisions.txt:'<sha1>', e.g. 'dae86e1950b1277e545cee180551750029cfe735', 'dae86e'::\n>   Documentation/revisions.txt:'<describeOutput>', e.g. 'v1.7.4.2-679-g3bee7fb'::\n>   Documentation/revisions.txt:'<refname>', e.g. 'master', 'heads/master', 'refs/heads/master'::\n>   Documentation/revisions.txt:'<refname>@\\{<date>\\}', e.g. 'master@\\{yesterday\\}', 'HEAD@\\{5 minutes ago\\\n>   Documentation/revisions.txt:'<refname>@\\{<n>\\}', e.g. 'master@\\{1\\}'::\n>   Documentation/revisions.txt:'@\\{<n>\\}', e.g. '@\\{1\\}'::\n>   Documentation/revisions.txt:'@\\{-<n>\\}', e.g. '@\\{-1\\}'::\n>   Documentation/revisions.txt:'<branchname>@\\{upstream\\}', e.g. 'master@\\{upstream\\}', '@\\{u\\}'::\n>   Documentation/revisions.txt:'<rev>{caret}', e.g. 'HEAD{caret}, v1.5.1{caret}0'::\n>   Documentation/revisions.txt:'<rev>{tilde}<n>', e.g. 'master{tilde}3'::\n>   Documentation/revisions.txt:'<rev>{caret}\\{<type>\\}', e.g. 'v0.99.8{caret}\\{commit\\}'::\n>   Documentation/revisions.txt:'<rev>{caret}\\{\\}', e.g. 'v0.99.8{caret}\\{\\}'::\n>   Documentation/revisions.txt:'<rev>{caret}\\{/<text>\\}', e.g. 'HEAD^{/fix nasty bug}'::\n>   Documentation/revisions.txt:':/<text>', e.g. ':/fix nasty bug'::\n>   Documentation/revisions.txt:'<rev>:<path>', e.g. 'HEAD:README', ':README', 'master:./README'::\n>   Documentation/revisions.txt:':<n>:<path>', e.g. ':0:README', ':README'::\n>   Documentation/revisions.txt:'<rev>{caret}@', e.g. 'HEAD{caret}@'::\n>   Documentation/revisions.txt:'<rev>{caret}!', e.g. 'HEAD{caret}!'::\n"},{"id":"213057","messageId":"7v38v75vaz.fsf@alter.siamese.dyndns.org","threadId":"33365","inReplyTo":"87k3ojtz9n.fsf@linux-k42r.v.cablecom.net","subject":"Re: [PATCH] git-tag(1): we tag HEAD by default","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-04-03T18:21:56Z","receivedAt":"2013-04-03T18:21:56Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thomas Rast <trast@inf.ethz.ch> writes:\n\n> Yann Droneaud <ydroneaud@opteya.com> writes:\n> ...\n>> Is there any other kind of object that can be tagged ... and what is\n>> the purpose of this ?\n>\n> Any object type, including tags.  Signed tags of other tags probably\n> make sense if you want to express extra approval on top of the original\n> signature.\n\nI looked at what \"git show\" implements, and it seems to peel each\nlevel of tags to show all of them, which is very good.\n"}]}