{"thread":{"id":"13784","subject":"[PATCH] describe match pattern for soft tags too","startedAt":"2008-06-03T17:59:02Z","lastAt":"2008-06-04T19:06:15Z","messageCount":6,"participants":["Michael Dressel","Johannes Schindelin","Shawn O. Pearce","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"78524","messageId":"alpine.LNX.1.10.0806031957360.3605@pollux","threadId":"13784","inReplyTo":null,"subject":"[PATCH] describe match pattern for soft tags too","fromName":"Michael Dressel","fromEmail":"michaeltilodressel@t-online.de","sentAt":"2008-06-03T17:59:02Z","receivedAt":"2008-06-03T17:59:02Z","isPatch":true,"sender":{"key":"michaeltilodressel@t-online.de","avatar":null},"body":"\nSo far git describe --match <pattern> would apply the <pattern> only\nto tag objects not to soft tags. This change make describe apply\nthe <pattern> to soft tags too.\n---\n  builtin-describe.c |    4 ++--\n  1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin-describe.c b/builtin-describe.c\nindex df554b3..a1b8251 100644\n--- a/builtin-describe.c\n+++ b/builtin-describe.c\n@@ -82,10 +82,10 @@ static int get_name(const char *path, const unsigned char *sha1, int flag, void\n  \tif (might_be_tag) {\n  \t\tif (is_tag) {\n  \t\t\tprio = 2;\n-\t\t\tif (pattern && fnmatch(pattern, path + 10, 0))\n-\t\t\t\tprio = 0;\n  \t\t} else\n  \t\t\tprio = 1;\n+\t\tif (pattern && fnmatch(pattern, path + 10, 0))\n+\t\t\tprio = 0;\n  \t}\n  \telse\n  \t\tprio = 0;\n-- \n1.5.5.3\n"},{"id":"78542","messageId":"alpine.DEB.1.00.0806032124040.13507@racer.site.net","threadId":"13784","inReplyTo":"alpine.LNX.1.10.0806031957360.3605@pollux","subject":"Re: [PATCH] describe match pattern for soft tags too","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-06-03T20:24:23Z","receivedAt":"2008-06-03T20:24:23Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 3 Jun 2008, Michael Dressel wrote:\n\n> So far git describe --match <pattern> would apply the <pattern> only\n> to tag objects not to soft tags.\n\nAnd I thought that was what --tags was for.\n\nCiao,\nDscho\n"},{"id":"78562","messageId":"20080603224225.GN12896@spearce.org","threadId":"13784","inReplyTo":"alpine.DEB.1.00.0806032124040.13507@racer.site.net","subject":"Re: [PATCH] describe match pattern for soft tags too","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-06-03T22:42:26Z","receivedAt":"2008-06-03T22:42:26Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> On Tue, 3 Jun 2008, Michael Dressel wrote:\n> \n> > So far git describe --match <pattern> would apply the <pattern> only\n> > to tag objects not to soft tags.\n> \n> And I thought that was what --tags was for.\n\nYes.  However there is a bug in git-describe's implementation;\n--match only tested on annotated tags.  The test was buried inside\nof the block that handles the annotated case.  Michael's patch pulls\nthis test outside where it can apply to lightweight tags when --tags\nis included on the command line.\n\n-- \nShawn.\n"},{"id":"78563","messageId":"20080603224839.GO12896@spearce.org","threadId":"13784","inReplyTo":"alpine.LNX.1.10.0806031957360.3605@pollux","subject":"Re: [PATCH] describe match pattern for soft tags too","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-06-03T22:48:39Z","receivedAt":"2008-06-03T22:48:39Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Michael Dressel <MichaelTiloDressel@t-online.de> wrote:\n> \n> So far git describe --match <pattern> would apply the <pattern> only\n> to tag objects not to soft tags. This change make describe apply\n> the <pattern> to soft tags too.\n\nWhoops.\n\nSigned-off-by tag?\n\nAssuming you supply Junio an SBO tag,\n\nAcked-by: Shawn O. Pearce <spearce@spearce.org>\n\n> ---\n>  builtin-describe.c |    4 ++--\n>  1 files changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/builtin-describe.c b/builtin-describe.c\n> index df554b3..a1b8251 100644\n> --- a/builtin-describe.c\n> +++ b/builtin-describe.c\n> @@ -82,10 +82,10 @@ static int get_name(const char *path, const unsigned \n> char *sha1, int flag, void\n>  \tif (might_be_tag) {\n>  \t\tif (is_tag) {\n>  \t\t\tprio = 2;\n> -\t\t\tif (pattern && fnmatch(pattern, path + 10, 0))\n> -\t\t\t\tprio = 0;\n>  \t\t} else\n>  \t\t\tprio = 1;\n> +\t\tif (pattern && fnmatch(pattern, path + 10, 0))\n> +\t\t\tprio = 0;\n>  \t}\n>  \telse\n>  \t\tprio = 0;\n\n-- \nShawn.\n"},{"id":"78586","messageId":"7vy75lzqew.fsf@gitster.siamese.dyndns.org","threadId":"13784","inReplyTo":"20080603224839.GO12896@spearce.org","subject":"Re: [PATCH] describe match pattern for soft tags too","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-06-04T06:04:55Z","receivedAt":"2008-06-04T06:04:55Z","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> Michael Dressel <MichaelTiloDressel@t-online.de> wrote:\n>> \n>> So far git describe --match <pattern> would apply the <pattern> only\n>> to tag objects not to soft tags. This change make describe apply\n>> the <pattern> to soft tags too.\n>\n> Whoops.\n\nMicronit.  They are called \"lightweight\" tags.  There aren't any hard tags\neither.\n\n> Signed-off-by tag?\n>\n> Assuming you supply Junio an SBO tag,\n>\n> Acked-by: Shawn O. Pearce <spearce@spearce.org>\n\nThanks for proofreading.\n"},{"id":"78652","messageId":"alpine.LNX.1.10.0806042104130.3410@pollux","threadId":"13784","inReplyTo":"7vy75lzqew.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] describe match pattern for soft tags too","fromName":"Michael Dressel","fromEmail":"michaeltilodressel@t-online.de","sentAt":"2008-06-04T19:06:15Z","receivedAt":"2008-06-04T19:06:15Z","isPatch":true,"sender":{"key":"michaeltilodressel@t-online.de","avatar":null},"body":"\nOn Tue, 3 Jun 2008, Junio C Hamano wrote:\n\n> \"Shawn O. Pearce\" <spearce@spearce.org> writes:\n>\n>> Michael Dressel <MichaelTiloDressel@t-online.de> wrote:\n>>>\n>>> So far git describe --match <pattern> would apply the <pattern> only\n>>> to tag objects not to soft tags. This change make describe apply\n>>> the <pattern> to soft tags too.\n>>\n>> Whoops.\n>\n> Micronit.  They are called \"lightweight\" tags.  There aren't any hard tags\n> either.\n>\n>> Signed-off-by tag?\n>>\n>> Assuming you supply Junio an SBO tag,\n>>\n>> Acked-by: Shawn O. Pearce <spearce@spearce.org>\n>\n> Thanks for proofreading.\n\nThanks for the comments.\nI will sent in a new patch see:\n\n[PATCH] describe: match pattern for lightweight tags too\n\nCheers,\nMichael\n"}]}