{"thread":{"id":"16875","subject":"[PATCH] describe: Avoid unnecessary warning when using --all","startedAt":"2008-12-26T22:02:01Z","lastAt":"2008-12-27T00:40:19Z","messageCount":6,"participants":["Shawn O. Pearce","Junio C Hamano","Miklos Vajna"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"98743","messageId":"20081226220201.GA20516@spearce.org","threadId":"16875","inReplyTo":null,"subject":"[PATCH] describe: Avoid unnecessary warning when using --all","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-12-26T22:02:01Z","receivedAt":"2008-12-26T22:02:01Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"In 212945d4 (\"Teach git-describe to verify annotated tag names\nbefore output\") git-describe learned how to output a warning if\nan annotated tag object was matched but its internal name doesn't\nmatch the local ref name.\n\nHowever, \"git describe --all\" causes the local ref name to be\nprefixed with \"tags/\", so we need to skip over this prefix before\ncomparing the local ref name with the name recorded inside of the\ntag object.\n\nPatch-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>\nSigned-off-by: Shawn O. Pearce <sop@google.com>\n---\n IMHO, suitable for maint...\n\n builtin-describe.c  |    2 +-\n t/t6120-describe.sh |    6 ++++++\n 2 files changed, 7 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin-describe.c b/builtin-describe.c\nindex d2cfb1b..3a007ed 100644\n--- a/builtin-describe.c\n+++ b/builtin-describe.c\n@@ -158,7 +158,7 @@ static void display_name(struct commit_name *n)\n \t\tn->tag = lookup_tag(n->sha1);\n \t\tif (!n->tag || parse_tag(n->tag) || !n->tag->tag)\n \t\t\tdie(\"annotated tag %s not available\", n->path);\n-\t\tif (strcmp(n->tag->tag, n->path))\n+\t\tif (strcmp(n->tag->tag, all ? n->path + 5 : n->path))\n \t\t\twarning(\"tag '%s' is really '%s' here\", n->tag->tag, n->path);\n \t}\n \ndiff --git a/t/t6120-describe.sh b/t/t6120-describe.sh\nindex e6c9e59..8c7e081 100755\n--- a/t/t6120-describe.sh\n+++ b/t/t6120-describe.sh\n@@ -100,6 +100,12 @@ check_describe B --tags HEAD^^2^\n check_describe B-0-* --long HEAD^^2^\n check_describe A-3-* --long HEAD^^2\n \n+: >err.expect\n+check_describe A --all A^0\n+test_expect_success 'no warning was displayed for A' '\n+\ttest_cmp err.expect err.actual\n+'\n+\n test_expect_success 'rename tag A to Q locally' '\n \tmv .git/refs/tags/A .git/refs/tags/Q\n '\n-- \n1.6.1.302.gccd4d\n"},{"id":"98757","messageId":"7vmyeijws2.fsf@gitster.siamese.dyndns.org","threadId":"16875","inReplyTo":"20081226220201.GA20516@spearce.org","subject":"Re: [PATCH] describe: Avoid unnecessary warning when using --all","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-12-27T00:18:21Z","receivedAt":"2008-12-27T00:18:21Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Shawn O. Pearce\" <spearce@spearce.org> writes:\n\n> In 212945d4 (\"Teach git-describe to verify annotated tag names\n> before output\") git-describe learned how to output a warning if\n> an annotated tag object was matched but its internal name doesn't\n> match the local ref name.\n>\n> However, \"git describe --all\" causes the local ref name to be\n> prefixed with \"tags/\", so we need to skip over this prefix before\n> comparing the local ref name with the name recorded inside of the\n> tag object.\n>\n> Patch-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>\n> Signed-off-by: Shawn O. Pearce <sop@google.com>\n> ---\n>  IMHO, suitable for maint...\n\nYeah, do you prefer to be known as \"sop\" over \"spearce\" these days, by the\nway?  It does not make a difference to me but I just noticed that Author\nand S-o-b won't be matching, so I am just being curious.\n"},{"id":"98758","messageId":"20081227002627.GA21386@spearce.org","threadId":"16875","inReplyTo":"7vmyeijws2.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] describe: Avoid unnecessary warning when using --all","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-12-27T00:26:27Z","receivedAt":"2008-12-27T00:26:27Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Junio C Hamano <gitster@pobox.com> wrote:\n> \"Shawn O. Pearce\" <spearce@spearce.org> writes:\n> > Patch-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>\n> > Signed-off-by: Shawn O. Pearce <sop@google.com>\n> \n> Yeah, do you prefer to be known as \"sop\" over \"spearce\" these days, by the\n> way?  It does not make a difference to me but I just noticed that Author\n> and S-o-b won't be matching, so I am just being curious.\n\nWhoops.\n\nI use spearce@spearce.org for my Git work so the S-o-b line above\nis wrong.  I just fixed it in my development repository on the work\nsystem I used to make this patch.\n\nHaving two personalities is hard...  ;-)\n\nCan you please amend to use my normal spearce@spearce.org address?\n\n-- \nShawn.\n"},{"id":"98761","messageId":"20081227003859.GU21154@genesis.frugalware.org","threadId":"16875","inReplyTo":"20081227002627.GA21386@spearce.org","subject":"Re: [PATCH] describe: Avoid unnecessary warning when using --all","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-12-27T00:38:59Z","receivedAt":"2008-12-27T00:38:59Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Fri, Dec 26, 2008 at 04:26:27PM -0800, \"Shawn O. Pearce\" <spearce@spearce.org> wrote:\n> Having two personalities is hard...  ;-)\n> \n> Can you please amend to use my normal spearce@spearce.org address?\n\nBTW, what Pasky/Nice did was to keep the author field the same, but\nchange the S-o-b line based on if they did it in their free time or in\nwork hours.\n\nLike this one:\n\nhttp://article.gmane.org/gmane.comp.version-control.git/97419\n\nAnd the related thread:\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/96690/focus=96768\n"},{"id":"98764","messageId":"7v63l6jvrl.fsf@gitster.siamese.dyndns.org","threadId":"16875","inReplyTo":"20081227002627.GA21386@spearce.org","subject":"Re: [PATCH] describe: Avoid unnecessary warning when using --all","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-12-27T00:40:14Z","receivedAt":"2008-12-27T00:40:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Shawn O. Pearce\" <spearce@spearce.org> writes:\n\n> I use spearce@spearce.org for my Git work so the S-o-b line above\n> is wrong.  I just fixed it in my development repository on the work\n> system I used to make this patch.\n>\n> Having two personalities is hard...  ;-)\n>\n> Can you please amend to use my normal spearce@spearce.org address?\n\nThanks, done.\n"},{"id":"98763","messageId":"20081227004019.GV21154@genesis.frugalware.org","threadId":"16875","inReplyTo":"20081227003859.GU21154@genesis.frugalware.org","subject":"Re: [PATCH] describe: Avoid unnecessary warning when using --all","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-12-27T00:40:19Z","receivedAt":"2008-12-27T00:40:19Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Sat, Dec 27, 2008 at 01:38:59AM +0100, Miklos Vajna <vmiklos@frugalware.org> wrote:\n> On Fri, Dec 26, 2008 at 04:26:27PM -0800, \"Shawn O. Pearce\" <spearce@spearce.org> wrote:\n> > Having two personalities is hard...  ;-)\n> > \n> > Can you please amend to use my normal spearce@spearce.org address?\n> \n> BTW, what Pasky/Nice did was to keep the author field the same, but\n\nErr, I meant to mention Nico, sorry.\n"}]}