git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] describe: add support for multiple match patterns

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 7, 2016, 22:08 UTC
Message-ID
<xmqqa8c7wfxu.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20161207023259.29355-2-jacob.e.keller@intel.com>
Jacob Keller <jacob.e.keller@intel.com> writes:
Show 11 quoted lines
> ... Suppose that you version all
> your official releases such as "v1.2", "v1.3", "v1.4", "v2.1" and so on.
> Now, you also have other tags which represent -rc releases and other
> such tags. If you want to find the first major release that contains
> a given commit you might try
>
> git describe --contains --match="v?.?" <commit>
>
> This will work as long as you have only single digits. But if you start
> adding multiple digits, the pattern becomes not enough to match all the
> tags you wanted while excluding the ones you didn't.

Isn't what you really want for the use case a negative pattern, i.e. "I want ones that match v* but not the ones that match *-rc*", though?

Previous: Jacob KellerNext: Jacob Keller
Message 3 of 6 in “name-rev: allow passing multiple patterns using --refs”
  1. 1/2 name-rev: allow passing multiple patterns using --refsJacob Keller, Dec 7, 2016
  2. 2/2 describe: add support for multiple match patternsJacob Keller, Dec 7, 2016
  3. Junio C HamanoDec 7, 2016
  4. Jacob KellerDec 7, 2016
  5. Junio C HamanoDec 8, 2016
  6. Jacob KellerDec 8, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.