{"thread":{"id":"34868","subject":"[PATCH] GIT-VERSION-GEN: Do not require tags to be annotated","startedAt":"2013-09-06T20:10:18Z","lastAt":"2013-09-10T19:45:11Z","messageCount":16,"participants":["Sebastian Schuberth","Junio C Hamano","Kyle J. McKay","Felipe Contreras"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"226984","messageId":"522A36AA.3050701@gmail.com","threadId":"34868","inReplyTo":null,"subject":"[PATCH] GIT-VERSION-GEN: Do not require tags to be annotated","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2013-09-06T20:10:18Z","receivedAt":"2013-09-06T20:10:18Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"For custom builds of Git it sometimes is inconvenient to annotate tags\nbecause there simply is nothing to say, so do not require an annotation.\n\nSigned-off-by: Sebastian Schuberth <sschuberth@gmail.com>\n---\n GIT-VERSION-GEN | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN\nindex b444c18..68b61e3 100755\n--- a/GIT-VERSION-GEN\n+++ b/GIT-VERSION-GEN\n@@ -12,7 +12,7 @@ if test -f version\n then\n \tVN=$(cat version) || VN=\"$DEF_VER\"\n elif test -d ${GIT_DIR:-.git} -o -f .git &&\n-\tVN=$(git describe --match \"v[0-9]*\" --abbrev=7 HEAD 2>/dev/null) &&\n+\tVN=$(git describe --tags --match \"v[0-9]*\" --abbrev=7 HEAD 2>/dev/null) &&\n \tcase \"$VN\" in\n \t*$LF*) (exit 1) ;;\n \tv[0-9]*)\n-- \n1.8.3.msysgit.1.3.g5b82b42.dirty\n"},{"id":"226989","messageId":"xmqqeh91wrvq.fsf@gitster.dls.corp.google.com","threadId":"34868","inReplyTo":"522A36AA.3050701@gmail.com","subject":"Re: [PATCH] GIT-VERSION-GEN: Do not require tags to be annotated","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-09-06T21:40:41Z","receivedAt":"2013-09-06T21:40:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sebastian Schuberth <sschuberth@gmail.com> writes:\n\n> For custom builds of Git it sometimes is inconvenient to annotate tags\n> because there simply is nothing to say, so do not require an annotation.\n>\n> Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>\n> ---\n\nHmmmm, personally I'd actually want this to stay the way it is, or\neven require a valid signed tag, in order to make sure I won't\nmistakenly creating a lightweight tag.\n\nIf you want to give build a custom name,\n\n    echo buildname >version\n\nshould be sufficient, no?\n\nI dunno.\n\n\n>  GIT-VERSION-GEN | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN\n> index b444c18..68b61e3 100755\n> --- a/GIT-VERSION-GEN\n> +++ b/GIT-VERSION-GEN\n> @@ -12,7 +12,7 @@ if test -f version\n>  then\n>  \tVN=$(cat version) || VN=\"$DEF_VER\"\n>  elif test -d ${GIT_DIR:-.git} -o -f .git &&\n> -\tVN=$(git describe --match \"v[0-9]*\" --abbrev=7 HEAD 2>/dev/null) &&\n> +\tVN=$(git describe --tags --match \"v[0-9]*\" --abbrev=7 HEAD 2>/dev/null) &&\n>  \tcase \"$VN\" in\n>  \t*$LF*) (exit 1) ;;\n>  \tv[0-9]*)\n"},{"id":"226998","messageId":"4065B5CE-7E81-41F3-B9DE-FDA05C43AAB0@gmail.com","threadId":"34868","inReplyTo":"522A36AA.3050701@gmail.com","subject":"Re: [PATCH] GIT-VERSION-GEN: Do not require tags to be annotated","fromName":"Kyle J. McKay","fromEmail":"mackyle@gmail.com","sentAt":"2013-09-06T22:34:08Z","receivedAt":"2013-09-06T22:34:08Z","isPatch":true,"sender":{"key":"mackyle@gmail.com","avatar":"https://avatars.githubusercontent.com/u/813346?v=4"},"body":"On Sep 6, 2013, at 13:10, Sebastian Schuberth wrote:\n> For custom builds of Git it sometimes is inconvenient to annotate tags\n> because there simply is nothing to say, so do not require an  \n> annotation.\n\nIt's not that hard to add -m \"\" to the command line:\n\n   git tag -a -m \"\" new-annotated-tag\n\nif you're just trying to avoid the editor or thinking up a message.   \nIs `-m \"\"` really that inconvenient?\n"},{"id":"227000","messageId":"522a754cee731_382e8cde804656@nysa.mail","threadId":"34868","inReplyTo":"xmqqeh91wrvq.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] GIT-VERSION-GEN: Do not require tags to be annotated","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-09-07T00:37:32Z","receivedAt":"2013-09-07T00:37:32Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Junio C Hamano wrote:\n> Sebastian Schuberth <sschuberth@gmail.com> writes:\n> \n> > For custom builds of Git it sometimes is inconvenient to annotate tags\n> > because there simply is nothing to say, so do not require an annotation.\n> >\n> > Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>\n> > ---\n> \n> Hmmmm, personally I'd actually want this to stay the way it is, or\n> even require a valid signed tag, in order to make sure I won't\n> mistakenly creating a lightweight tag.\n\nSo the only user Git should care about is you? If Git can make _you_ more\nconfortable not making certain mistakes, then that's the way it should be?\n\nWhat's the point of lightweight tags anyway? 'git describe' doesn't use them,\nGIT-VERSION-GEN neither, just remove them already.\n\nFor the vast majority of the people out there, a tag is a tag. Period.\n\n-- \nFelipe Contreras\n"},{"id":"227020","messageId":"CAHGBnuMmm=tHdpcBpcY6Vro-un3g2JR1N6C=J-jSX8f-1b0UOw@mail.gmail.com","threadId":"34868","inReplyTo":"4065B5CE-7E81-41F3-B9DE-FDA05C43AAB0@gmail.com","subject":"Re: [PATCH] GIT-VERSION-GEN: Do not require tags to be annotated","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2013-09-07T12:26:17Z","receivedAt":"2013-09-07T12:26:17Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"On Sat, Sep 7, 2013 at 12:34 AM, Kyle J. McKay <mackyle@gmail.com> wrote:\n\n>> For custom builds of Git it sometimes is inconvenient to annotate tags\n>> because there simply is nothing to say, so do not require an annotation.\n>\n> It's not that hard to add -m \"\" to the command line:\n\nIt's not hard to type those characters, but (for me) it's hard to\nremember that I have to do it.\n\n> if you're just trying to avoid the editor or thinking up a message.  Is `-m\n> \"\"` really that inconvenient?\n\nYes, to me it's inconvenient, but not that much. And I think passing\nan empty annotation like you suggest is even worse than not setting an\nannotation at all, because I would assume if an annotation is set it's\nnot empty, and if it is, I would expect this to be a user error.\n\n-- \nSebastian Schuberth\n"},{"id":"227021","messageId":"CAHGBnuP6w8rvoz+h2Xase1ApY_kpZh4X=VF6LY4O0r7RS0UayA@mail.gmail.com","threadId":"34868","inReplyTo":"xmqqeh91wrvq.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] GIT-VERSION-GEN: Do not require tags to be annotated","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2013-09-07T12:28:09Z","receivedAt":"2013-09-07T12:28:09Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"On Fri, Sep 6, 2013 at 11:40 PM, Junio C Hamano <gitster@pobox.com> wrote:\n\n>> For custom builds of Git it sometimes is inconvenient to annotate tags\n>> because there simply is nothing to say, so do not require an annotation.\n>>\n>> Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>\n>> ---\n>\n> Hmmmm, personally I'd actually want this to stay the way it is, or\n> even require a valid signed tag, in order to make sure I won't\n> mistakenly creating a lightweight tag.\n>\n> If you want to give build a custom name,\n>\n>     echo buildname >version\n>\n> should be sufficient, no?\n\nThat's not sufficient if you care about a proper (automated) release\nworkflow with your releases tagged.\n\n> I dunno.\n\nThat's fine, I do not care too deeply about this. I just wanted to\ngive this patch a try and see what others think. Feel free to drop it.\n\n-- \nSebastian Schuberth\n"},{"id":"227023","messageId":"xmqqsixgvci1.fsf@gitster.dls.corp.google.com","threadId":"34868","inReplyTo":"CAHGBnuP6w8rvoz+h2Xase1ApY_kpZh4X=VF6LY4O0r7RS0UayA@mail.gmail.com","subject":"Re: [PATCH] GIT-VERSION-GEN: Do not require tags to be annotated","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-09-07T16:10:30Z","receivedAt":"2013-09-07T16:10:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sebastian Schuberth <sschuberth@gmail.com> writes:\n\n> On Fri, Sep 6, 2013 at 11:40 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>\n>>> For custom builds of Git it sometimes is inconvenient to annotate tags\n>>> because there simply is nothing to say, so do not require an annotation.\n>>>\n>>> Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>\n>>> ---\n>>\n>> Hmmmm, personally I'd actually want this to stay the way it is, or\n>> even require a valid signed tag, in order to make sure I won't\n>> mistakenly creating a lightweight tag.\n\nI do not mind taking the patch after all, after thinking about it\na bit more.\n\nSee later part of the message for this.\n\n>> If you want to give build a custom name,\n>>\n>>     echo buildname >version\n>>\n>> should be sufficient, no?\n>\n> That's not sufficient if you care about a proper (automated) release\n> workflow with your releases tagged.\n\nI take the above \"your\" does not refer to \"mine, Junio's\".\n\nI am not sure what you mean by automated, but if you can tell your\nautomation infrastructure that the way to build this Git software is\nto run \"make\" in it, shouldn't it be trivial to instead tell it to\nrun something like this instead?\n\n\tgit describe --tags HEAD >version && make\n\nOr are these tags you want G-V-G to use also droppings of the\nautomated process?  That is, what you tell the automation\ninfrastructure is to run something like this?\n\n\tgit tag build-$(date +\"%Y-%m-%d\") && make\n\nIf that is the case, it would be sufficient to tweak that to leave\nthe same information in >version file and you do not lose any\nautomation.\n\nSo I do not understand the above \"not sufficient if you care about\"\ncomment at all.\n\nHaving said all that.\n\nI do not think the current use of \"describe\" helps the builder to\navoid making a light-weight tag by mistake anyway, as it would be\nvery natural to update DEF_VER to a matching string. In a month or\nso, I am sure I'd update that line to v1.8.5 before I make a tag\nwith the same name, and it does not matter if the current use of\n\"describe\" skipped a mistakenly-made lightweight v1.8.5 tag when\ndeciding the embedded version string---the end result will get the\nsame string from DEF_VER and running \"git version\" with the built\nbinary will happily show v1.8.5 the same way.\n\nI am however still curious what kind of other tags (either signed,\nannotated, or lightweight) you are using for this purpose. Is there\na case where you have your own tag that points at the exact version\nas I tagged?  In such a case, do you have a preference on which tag\ndo you want GIT-VERSION-GEN to use?\n"},{"id":"227028","messageId":"CAHGBnuNKrtGSoOYS1T0VH=tGvKUW0XKFnWf_WNvZkOriGurgpg@mail.gmail.com","threadId":"34868","inReplyTo":"xmqqsixgvci1.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] GIT-VERSION-GEN: Do not require tags to be annotated","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2013-09-07T19:47:25Z","receivedAt":"2013-09-07T19:47:25Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"On Sat, Sep 7, 2013 at 6:10 PM, Junio C Hamano <gitster@pobox.com> wrote:\n\n>>> If you want to give build a custom name,\n>>>\n>>>     echo buildname >version\n>>>\n>>> should be sufficient, no?\n>>\n>> That's not sufficient if you care about a proper (automated) release\n>> workflow with your releases tagged.\n>\n> I take the above \"your\" does not refer to \"mine, Junio's\".\n\nRight, I was not meaning to refer to you personally or Git as a\nproject, but \"anyone's project\".\n\n> I am not sure what you mean by automated, but if you can tell your\n> automation infrastructure that the way to build this Git software is\n> to run \"make\" in it, shouldn't it be trivial to instead tell it to\n> run something like this instead?\n>\n>         git describe --tags HEAD >version && make\n\nIt probably would be trivial, but I'd like to use as much of upstream\nGit's build logic as possible without the need to create a custom\nfile.\n\n> Or are these tags you want G-V-G to use also droppings of the\n> automated process?  That is, what you tell the automation\n> infrastructure is to run something like this?\n>\n>         git tag build-$(date +\"%Y-%m-%d\") && make\n\nSort of. I manually tag a commit as \"good for testing\", and the CI\nserver that's watching for new tags in the repo then builds my custom\nGit from that tag and runs the tests. If all tests pass the custom Git\nbinaries are packaged and uploaded to a binary artifact server. I'd\nlike the version that git reports as well as the version that's\nincluded in the binary artifact file names to be directly derived from\nthe tag. I simply do not like the idea of having a tag *and* a version\nfile, even if the version file is derived from the tag, simply because\nthere's still a slight chance that the tag and version file might\ndiverge due to some mistake / error / bug.\n\n> I do not think the current use of \"describe\" helps the builder to\n> avoid making a light-weight tag by mistake anyway, as it would be\n> very natural to update DEF_VER to a matching string. In a month or\n> so, I am sure I'd update that line to v1.8.5 before I make a tag\n> with the same name, and it does not matter if the current use of\n> \"describe\" skipped a mistakenly-made lightweight v1.8.5 tag when\n> deciding the embedded version string---the end result will get the\n> same string from DEF_VER and running \"git version\" with the built\n> binary will happily show v1.8.5 the same way.\n\nWhich raises another question on my side: Isn't it tedious for you to\nboth update DEF_VER *and* tag a version? Wouldn't it probably be less\nerror prove (in the sense of keeping DEF_VER and tagged version in\nsync) to remove DEF_VER completely and just die if all ways to derive\na Git version fail?\n\n> I am however still curious what kind of other tags (either signed,\n> annotated, or lightweight) you are using for this purpose. Is there\n\nIn general, so far I had very little use for other tags than\nlightweight tags. That's mainly because I believe my stuff is not\n\"important\" enough to be signed, and I rarely have something to say\nabout a tag besides its name. Most annotate tags I've seen so far are\njust trivial variations of the tag name, anyway.\n\n> a case where you have your own tag that points at the exact version\n> as I tagged?  In such a case, do you have a preference on which tag\n\nNo. I always carry patches on top.\n\n-- \nSebastian Schuberth\n"},{"id":"227041","messageId":"CAMP44s2NUvm41+ysvj0hp5SvDtFZDt-4pGnh8hP4UT1kBRaUxQ@mail.gmail.com","threadId":"34868","inReplyTo":"xmqqsixgvci1.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] GIT-VERSION-GEN: Do not require tags to be annotated","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-09-08T00:54:36Z","receivedAt":"2013-09-08T00:54:36Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Sat, Sep 7, 2013 at 11:10 AM, Junio C Hamano <gitster@pobox.com> wrote:\n\n> I am not sure what you mean by automated, but if you can tell your\n> automation infrastructure that the way to build this Git software is\n> to run \"make\" in it, shouldn't it be trivial to instead tell it to\n> run something like this instead?\n>\n>         git describe --tags HEAD >version && make\n\nWhich is a pretty stupid option. 'git describe' does use tags by\ndefault anyway, what else is it supposed to do?\n\n-- \nFelipe Contreras\n"},{"id":"227042","messageId":"CAMP44s3OyhHYv7JXf6UH1DnTWPTnD+15EZTnAmSvGb6BE1OdzQ@mail.gmail.com","threadId":"34868","inReplyTo":"CAJDDKr4JBeccwuD4PVq0ryO27Eyfz+yUAHT7xm0Dkh19SZpV4g@mail.gmail.com","subject":"Re: [PATCH] GIT-VERSION-GEN: Do not require tags to be annotated","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-09-08T00:58:15Z","receivedAt":"2013-09-08T00:58:15Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Fri, Sep 6, 2013 at 11:30 PM, David Aguilar <davvid@gmail.com> wrote:\n>\n> On Sep 6, 2013 7:51 PM, \"Felipe Contreras\" <felipe.contreras@gmail.com>\n> wrote:\n>>\n>> Junio C Hamano wrote:\n>> > Sebastian Schuberth <sschuberth@gmail.com> writes:\n>> >\n>> > > For custom builds of Git it sometimes is inconvenient to annotate tags\n>> > > because there simply is nothing to say, so do not require an\n>> > > annotation.\n>> > >\n>> > > Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>\n>> > > ---\n>> >\n>> > Hmmmm, personally I'd actually want this to stay the way it is, or\n>> > even require a valid signed tag, in order to make sure I won't\n>> > mistakenly creating a lightweight tag.\n>>\n>> So the only user Git should care about is you? If Git can make _you_ more\n>> confortable not making certain mistakes, then that's the way it should be?\n>\n> Yes, certainly. Why would you think otherwise?\n\nThe whole purpose of a public software project is that it's useful to others.\n\n>> What's the point of lightweight tags anyway? 'git describe' doesn't use\n>> them,\n>> GIT-VERSION-GEN neither, just remove them already.\n>\n> RTFM\n\nI don't see anything in the manual explaining why lightweight tags are\nuseful, if all the Git tools just ignore them, and why the do that.\n\n>> For the vast majority of the people out there, a tag is a tag. Period.\n>\n> Not for me. You are wrong.\n\nYou are not the vast majority, you are a single person.\n\n-- \nFelipe Contreras\n"},{"id":"227278","messageId":"xmqqr4cx1u7u.fsf@gitster.dls.corp.google.com","threadId":"34868","inReplyTo":"CAHGBnuNKrtGSoOYS1T0VH=tGvKUW0XKFnWf_WNvZkOriGurgpg@mail.gmail.com","subject":"Re: [PATCH] GIT-VERSION-GEN: Do not require tags to be annotated","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-09-08T17:41:12Z","receivedAt":"2013-09-08T17:41:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sebastian Schuberth <sschuberth@gmail.com> writes:\n\n> Which raises another question on my side: Isn't it tedious for you to\n> both update DEF_VER *and* tag a version? Wouldn't it probably be less\n> error prove (in the sense of keeping DEF_VER and tagged version in\n> sync) to remove DEF_VER completely and just die if all ways to derive\n> a Git version fail?\n\nI do not see how it will fly well.  Some people want to build out of\ntarballs without having any \"describe\", and DEF_VER and version were\nadded for that specific purpose.\n\n>> a case where you have your own tag that points at the exact version\n>> as I tagged?  In such a case, do you have a preference on which tag\n>\n> No. I always carry patches on top.\n\nThat answer sidesteps the real issue; which one would you prefer if\nthere are two or more tags?  \"describe\" updated with your patch\nwould consider both and I think it favours the annotated one over\nlightweight.  If it matches the preferred order then G-V-N with you\npatch would help your workflow; otherwise you would still need a\ndifferent way, e.g. making sure what you want it to use is always\nused by doing the \">version\" thing.\n"},{"id":"227286","messageId":"CAMP44s3Nh-YoYTOXdxJDp469P7dz=kiEEXr3_XKzxuepFiD1GA@mail.gmail.com","threadId":"34868","inReplyTo":"xmqqr4cx1u7u.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] GIT-VERSION-GEN: Do not require tags to be annotated","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-09-09T23:21:29Z","receivedAt":"2013-09-09T23:21:29Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Sun, Sep 8, 2013 at 12:41 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Sebastian Schuberth <sschuberth@gmail.com> writes:\n>\n>> Which raises another question on my side: Isn't it tedious for you to\n>> both update DEF_VER *and* tag a version? Wouldn't it probably be less\n>> error prove (in the sense of keeping DEF_VER and tagged version in\n>> sync) to remove DEF_VER completely and just die if all ways to derive\n>> a Git version fail?\n>\n> I do not see how it will fly well.  Some people want to build out of\n> tarballs without having any \"describe\", and DEF_VER and version were\n> added for that specific purpose.\n\n'version' works, there's no need for DEF_VER.\n\n>>> a case where you have your own tag that points at the exact version\n>>> as I tagged?  In such a case, do you have a preference on which tag\n>>\n>> No. I always carry patches on top.\n>\n> That answer sidesteps the real issue; which one would you prefer if\n> there are two or more tags?  \"describe\" updated with your patch\n> would consider both and I think it favours the annotated one over\n> lightweight.  If it matches the preferred order then G-V-N with you\n> patch would help your workflow; otherwise you would still need a\n> different way, e.g. making sure what you want it to use is always\n> used by doing the \">version\" thing.\n\nThat is a red herring.\n\nIf there's a lightweight tag on top of v1.8.4, and Git chooses to use\nv1.8.4 as a version name, that's fine because as a matter of fact,\nthat's the real version, since there's no actual changes on top of\nthat.\n\n-- \nFelipe Contreras\n"},{"id":"227306","messageId":"CAHGBnuN=vpJPXgd78aLohW3Awe+Y+0J7Bxwr4Fmn2NijMK1Z5g@mail.gmail.com","threadId":"34868","inReplyTo":"xmqqr4cx1u7u.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] GIT-VERSION-GEN: Do not require tags to be annotated","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2013-09-10T08:06:37Z","receivedAt":"2013-09-10T08:06:37Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"On Sun, Sep 8, 2013 at 7:41 PM, Junio C Hamano <gitster@pobox.com> wrote:\n\n>> Which raises another question on my side: Isn't it tedious for you to\n>> both update DEF_VER *and* tag a version? Wouldn't it probably be less\n>> error prove (in the sense of keeping DEF_VER and tagged version in\n>> sync) to remove DEF_VER completely and just die if all ways to derive\n>> a Git version fail?\n>\n> I do not see how it will fly well.  Some people want to build out of\n> tarballs without having any \"describe\", and DEF_VER and version were\n> added for that specific purpose.\n\nRight, but do we really need DEF_VER *and* version? Couldn't we just\npackage official source tarballs in a way that they already contain an\nauto-generated version file?\n\n>>> a case where you have your own tag that points at the exact version\n>>> as I tagged?  In such a case, do you have a preference on which tag\n>>\n>> No. I always carry patches on top.\n>\n> That answer sidesteps the real issue; which one would you prefer if\n> there are two or more tags?  \"describe\" updated with your patch\n> would consider both and I think it favours the annotated one over\n> lightweight.  If it matches the preferred order then G-V-N with you\n> patch would help your workflow; otherwise you would still need a\n> different way, e.g. making sure what you want it to use is always\n> used by doing the \">version\" thing.\n\nMy answer sidesteps the issue because you were explicitly offering the\nsidestep in you original question ;-) Anyway, in such a scenario I\nwould probably prefer my own tag instead of upstream's tag, to be\nhonest. So you're right that in this case my patch won't help. But\nlike I said, the case is not valid for me as I will always carry\npatches on top, and other people might feel differently about which\ntag (annotated vs. lightweight) they prefer if both point to the same\ncommit.\n\n-- \nSebastian Schuberth\n"},{"id":"227315","messageId":"CAMP44s09-WavPg=X8xOaOWzWZvoW=D=wBr6L2FUfY7qNaS8j2Q@mail.gmail.com","threadId":"34868","inReplyTo":"CAHGBnuN=vpJPXgd78aLohW3Awe+Y+0J7Bxwr4Fmn2NijMK1Z5g@mail.gmail.com","subject":"Re: [PATCH] GIT-VERSION-GEN: Do not require tags to be annotated","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-09-10T09:53:45Z","receivedAt":"2013-09-10T09:53:45Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Tue, Sep 10, 2013 at 3:06 AM, Sebastian Schuberth\n<sschuberth@gmail.com> wrote:\n> On Sun, Sep 8, 2013 at 7:41 PM, Junio C Hamano <gitster@pobox.com> wrote:\n\n>>>> a case where you have your own tag that points at the exact version\n>>>> as I tagged?  In such a case, do you have a preference on which tag\n>>>\n>>> No. I always carry patches on top.\n>>\n>> That answer sidesteps the real issue; which one would you prefer if\n>> there are two or more tags?  \"describe\" updated with your patch\n>> would consider both and I think it favours the annotated one over\n>> lightweight.  If it matches the preferred order then G-V-N with you\n>> patch would help your workflow; otherwise you would still need a\n>> different way, e.g. making sure what you want it to use is always\n>> used by doing the \">version\" thing.\n>\n> My answer sidesteps the issue because you were explicitly offering the\n> sidestep in you original question ;-) Anyway, in such a scenario I\n> would probably prefer my own tag instead of upstream's tag, to be\n> honest. So you're right that in this case my patch won't help. But\n> like I said, the case is not valid for me as I will always carry\n> patches on top, and other people might feel differently about which\n> tag (annotated vs. lightweight) they prefer if both point to the same\n> commit.\n\nIndeed. I prefer it the other way; annotated takes precedence.\n\n-- \nFelipe Contreras\n"},{"id":"227322","messageId":"xmqqy574zmzd.fsf@gitster.dls.corp.google.com","threadId":"34868","inReplyTo":"CAHGBnuN=vpJPXgd78aLohW3Awe+Y+0J7Bxwr4Fmn2NijMK1Z5g@mail.gmail.com","subject":"Re: [PATCH] GIT-VERSION-GEN: Do not require tags to be annotated","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-09-10T15:59:34Z","receivedAt":"2013-09-10T15:59:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sebastian Schuberth <sschuberth@gmail.com> writes:\n\n> Right, but do we really need DEF_VER *and* version? Couldn't we just\n> package official source tarballs in a way that they already contain an\n> auto-generated version file?\n\nIf you read our Makefile, you will see that we do include the\nversion file in our official tarball with \"make dist\".\n\nThat however does not help those who use a tarball obtained from\ngit-archive, perhaps via gitweb running at the distribution site.\n\nTheoretically speaking, you can rip out everything but \"version\" and\ntell those who have been relying on the way other parts of G-V-G\nworked to change their workflow to stuff their favorite version\nstring to that file before building, so in that sense, we do not\n*need* DEF_VER and version.  But they have been there for a long\ntime, and I do not think it gives us a good trade-off between\nrisking regression and reducing the linecount to change it to remove\none.\n"},{"id":"227359","messageId":"CAHGBnuOtCU+4w_bb3vK0pN3eG_GusXitsBzb=ETcE30U54z9pQ@mail.gmail.com","threadId":"34868","inReplyTo":"xmqqy574zmzd.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] GIT-VERSION-GEN: Do not require tags to be annotated","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2013-09-10T19:45:11Z","receivedAt":"2013-09-10T19:45:11Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"On Tue, Sep 10, 2013 at 5:59 PM, Junio C Hamano <gitster@pobox.com> wrote:\n\n> string to that file before building, so in that sense, we do not\n> *need* DEF_VER and version.  But they have been there for a long\n> time, and I do not think it gives us a good trade-off between\n> risking regression and reducing the linecount to change it to remove\n> one.\n\nFair enough!\n\n-- \nSebastian Schuberth\n"}]}