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

Re: [PATCH/RFC 0/2] add a perl compatible regex match flag to git describe

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Dec 27, 2015, 23:39 UTC
Message-ID
<20151227233951.GA52863@vauxhall.crustytoothpaste.net>
In-Reply-To
<1451257192-5755-1-git-send-email-mostynb@opera.com>
On Sun, Dec 27, 2015 at 11:59:50PM +0100, Mostyn Bramley-Moore wrote:
Show 13 quoted lines
> git describe currently only supports glob matching with the --matches flag.
> It would be useful to support regular expressions.
> 
> PCRE is already an optional dependency from git grep, I wonder if posix or
> extended regexes would be preferable?
> 
> Some old discussion of this as a candidate feature is here, though nobody put
> together a patch as far as I can see:
> http://comments.gmane.org/gmane.comp.version-control.git/173873
> 
> Mostyn Bramley-Moore (2):
>   describe: mention glob in the --matches help text
>   describe: add --pcre-match option

If you're going to implement this, I'd recommend an option that adjusts --matches to accept a PCRE regexp instead of adding a new option accepting its own pattern. I'd also recommend calling it --perl-regexp for compatibility with git grep.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
Previous: Mostyn Bramley-Moore
Message 4 of 4 in “add a perl compatible regex match flag to git describe”
  1. 0/2 add a perl compatible regex match flag to git describeMostyn Bramley-Moore, Dec 27, 2015
  2. 1/2 describe: mention glob in the --matches help textMostyn Bramley-Moore, Dec 27, 2015
  3. 2/2 describe: add --pcre-match optionMostyn Bramley-Moore, Dec 27, 2015
  4. brian m. carlsonDec 27, 2015

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.