Subject: Re: [PATCH] describe: bail of --contains --all is used with --exclude or --match

From: Tuomas Ahola <[email-masked]>
Date: Tue, 19 May 2026 11:35:59 +0300

Jacob Keller <[email-masked]> wrote:

> From: Jacob Keller <[email-masked]>
> 
> If you try to use git describe --contains with --all, the exclude and
> match patterns are silently ignored.
> 
> This results in unexpected behavior, as you may try to provide patterns
> and expect it to change the result.
> 

I got just bitten by that, and yes, it was quite unexpected.

> Check for this, and have describe die when it encounters this, instead
> of silently ignoring the provided options.
> 
> Signed-off-by: Jacob Keller <[email-masked]>
> ---
> 
> I just found this while trying to use it, the patterns weren't being applied
> properly.
> 
> This is pretty quick/dirty, I haven't had time to write a test, or anything.
> 

Would you like to resurrect the patch?  It seems it was never merged,
nor the underlying problem fixed:

```
$ git describe --contains --all --match=bogus
master
$ git describe --contains --all --exclude="*"
master
```

>  builtin/describe.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
>  [...]

--Tuomas