* [PATCH] describe match pattern for soft tags too
@ 2008-06-03 17:59 Michael Dressel
2008-06-03 20:24 ` Johannes Schindelin
2008-06-03 22:48 ` Shawn O. Pearce
0 siblings, 2 replies; 6+ messages in thread
From: Michael Dressel @ 2008-06-03 17:59 UTC (permalink / raw
To: git
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(-)
diff --git a/builtin-describe.c b/builtin-describe.c
index df554b3..a1b8251 100644
--- a/builtin-describe.c
+++ b/builtin-describe.c
@@ -82,10 +82,10 @@ static int get_name(const char *path, const unsigned char *sha1, int flag, void
if (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;
--
1.5.5.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] describe match pattern for soft tags too
2008-06-03 17:59 [PATCH] describe match pattern for soft tags too Michael Dressel
@ 2008-06-03 20:24 ` Johannes Schindelin
2008-06-03 22:42 ` Shawn O. Pearce
2008-06-03 22:48 ` Shawn O. Pearce
1 sibling, 1 reply; 6+ messages in thread
From: Johannes Schindelin @ 2008-06-03 20:24 UTC (permalink / raw
To: Michael Dressel; +Cc: git
Hi,
On Tue, 3 Jun 2008, Michael Dressel wrote:
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] describe match pattern for soft tags too
2008-06-03 20:24 ` Johannes Schindelin
@ 2008-06-03 22:42 ` Shawn O. Pearce
0 siblings, 0 replies; 6+ messages in thread
From: Shawn O. Pearce @ 2008-06-03 22:42 UTC (permalink / raw
To: Johannes Schindelin; +Cc: Michael Dressel, git
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> On Tue, 3 Jun 2008, Michael Dressel wrote:
>
> > 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.
--
Shawn.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] describe match pattern for soft tags too
2008-06-03 17:59 [PATCH] describe match pattern for soft tags too Michael Dressel
2008-06-03 20:24 ` Johannes Schindelin
@ 2008-06-03 22:48 ` Shawn O. Pearce
2008-06-04 6:04 ` Junio C Hamano
1 sibling, 1 reply; 6+ messages in thread
From: Shawn O. Pearce @ 2008-06-03 22:48 UTC (permalink / raw
To: Michael Dressel; +Cc: git
Michael Dressel <MichaelTiloDressel@t-online.de> wrote:
>
> 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,
Acked-by: Shawn O. Pearce <spearce@spearce.org>
> ---
> builtin-describe.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/builtin-describe.c b/builtin-describe.c
> index df554b3..a1b8251 100644
> --- a/builtin-describe.c
> +++ b/builtin-describe.c
> @@ -82,10 +82,10 @@ static int get_name(const char *path, const unsigned
> char *sha1, int flag, void
> if (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;
--
Shawn.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] describe match pattern for soft tags too
2008-06-03 22:48 ` Shawn O. Pearce
@ 2008-06-04 6:04 ` Junio C Hamano
2008-06-04 19:06 ` Michael Dressel
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2008-06-04 6:04 UTC (permalink / raw
To: Shawn O. Pearce; +Cc: Michael Dressel, git
"Shawn O. Pearce" <spearce@spearce.org> writes:
> Michael Dressel <MichaelTiloDressel@t-online.de> wrote:
>>
>> 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.
> Signed-off-by tag?
>
> Assuming you supply Junio an SBO tag,
>
> Acked-by: Shawn O. Pearce <spearce@spearce.org>
Thanks for proofreading.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] describe match pattern for soft tags too
2008-06-04 6:04 ` Junio C Hamano
@ 2008-06-04 19:06 ` Michael Dressel
0 siblings, 0 replies; 6+ messages in thread
From: Michael Dressel @ 2008-06-04 19:06 UTC (permalink / raw
To: Junio C Hamano; +Cc: Shawn O. Pearce, Michael Dressel, git
On Tue, 3 Jun 2008, Junio C Hamano wrote:
> "Shawn O. Pearce" <spearce@spearce.org> writes:
>
>> Michael Dressel <MichaelTiloDressel@t-online.de> wrote:
>>>
>>> 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.
>
>> Signed-off-by tag?
>>
>> Assuming you supply Junio an SBO tag,
>>
>> Acked-by: Shawn O. Pearce <spearce@spearce.org>
>
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-06-04 19:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-03 17:59 [PATCH] describe match pattern for soft tags too Michael Dressel
2008-06-03 20:24 ` Johannes Schindelin
2008-06-03 22:42 ` Shawn O. Pearce
2008-06-03 22:48 ` Shawn O. Pearce
2008-06-04 6:04 ` Junio C Hamano
2008-06-04 19:06 ` Michael Dressel
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).