describe match pattern for soft tags too
PATCH 1/1 describe match pattern for soft tags too
So far git describe --match <pattern> would apply the <pattern> only to tag objects not to soft tags. This change make describe apply the <pattern> to soft tags too.
--- builtin-describe.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
builtin-describe.c +2 -2
@@ -82,10 +82,10 @@ static int get_name(const char *path, const unsigned char *sha1, int flag, voidif (might_be_tag) {if (is_tag) { prio =2 ; -if (pattern &&fnmatch (pattern, path +10 ,0 )) - prio =0 ; }else prio =1 ; +if (pattern &&fnmatch (pattern, path +10 ,0 )) + prio =0 ; }else prio =0 ;
Signature · 1 line
1.5.5.3
Hi,
Quoted 2 lines · Michael Dressel
So far git describe --match <pattern> would apply the <pattern> only to tag objects not to soft tags.
And I thought that was what --tags was for.
Ciao,
Dscho
Quoted 6 lines · Johannes Schindelin
Quoted 2 lines · Michael Dressel
So far git describe --match <pattern> would apply the <pattern> only to tag objects not to soft tags.
And I thought that was what --tags was for.
Yes. However there is a bug in git-describe's implementation; --match only tested on annotated tags. The test was buried inside of the block that handles the annotated case. Michael's patch pulls this test outside where it can apply to lightweight tags when --tags is included on the command line.
Signature · 1 line
Shawn.
Quoted 4 lines · Michael Dressel
So far git describe --match <pattern> would apply the <pattern> only to tag objects not to soft tags. This change make describe apply the <pattern> to soft tags too.
Whoops.
Signed-off-by tag?
Assuming you supply Junio an SBO tag,
Quoted 22 lines
--- builtin-describe.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)builtin-describe.c +0
-0@@ -82,10 +82,10 @@ static int get_name(const char *path, const unsignedchar *sha1, int flag, void
builtin-describe.c +2
-2if (might_be_tag) {if (is_tag) { prio =2 ; -if (pattern &&fnmatch (pattern, path +10 ,0 )) - prio =0 ; }else prio =1 ; +if (pattern &&fnmatch (pattern, path +10 ,0 )) + prio =0 ; }else prio =0 ;
Signature · 1 line
Shawn.
Quoted 7 lines · Shawn O. Pearce
Quoted 4 lines · Michael Dressel
So far git describe --match <pattern> would apply the <pattern> only to tag objects not to soft tags. This change make describe apply the <pattern> to soft tags too.
Whoops.
Micronit. They are called "lightweight" tags. There aren't any hard tags either.
Quoted 5 lines
Signed-off-by tag?
Assuming you supply Junio an SBO tag,
Acked-by Shawn O. Pearce <[email protected]>
Thanks for proofreading.
Quoted 13 lines · Junio C Hamano
Quoted 7 lines · Shawn O. Pearce
Quoted 4 lines · Michael Dressel
So far git describe --match <pattern> would apply the <pattern> only to tag objects not to soft tags. This change make describe apply the <pattern> to soft tags too.
Whoops.
Micronit. They are called "lightweight" tags. There aren't any hard tags either.
Quoted 7 lines
Quoted 5 lines
Signed-off-by tag?
Assuming you supply Junio an SBO tag,
Acked-by Shawn O. Pearce <[email protected]>Thanks for proofreading.
Thanks for the comments.
I will sent in a new patch see:
[PATCH] describe: match pattern for lightweight tags too
Cheers,
Michael