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

Re: [PATCH 0/5] Extend pattern refspecs

From
Jay Soffian <jaysoffian@gmail.com>
Date
Mar 6, 2009, 05:19 UTC
Message-ID
<76718490903052119y4d6a7e0ck24bfeb1c0964e413@mail.gmail.com>
In-Reply-To
<alpine.LNX.1.00.0903052346270.19665@iabervon.org>
On Thu, Mar 5, 2009 at 11:56 PM, Daniel Barkalow <barkalow@iabervon.org> wrote:
Show 12 quoted lines
> This series only supports the narrowest case of having the * in the middle
> of a side of a refspec: having it as a full path component on each side.
>
> Patches 1-3 centralize all of the parsing and matching rules to a pair of
> functions; patch 4 makes the stored representation more convenient (and
> serves as a distinguished bisection outcome for anything I missed that was
> relying on the contents of struct refspec for patterns); and patch 5
> extends the matching implementation and loosens the ref format
> requirements to allow the * to be in the middle.
>
> An easy followup would relax the restrictions further without requiring
> any particularly tricky further changes.

This series and js/remote-improvements (e5dcbfd) in pu may not get along completely. "git remote show" tries to show how the refspecs expand out. And actually, that should be fine since builtin-remote now uses the same code as fetch/push to expand the refs.

However, "git remote show -n" (-n means don't query the remote) makes use of a new function, get_push_ref_states_noquery(), which more or less tries to reverse the parsed refspec back into the original string. That function relies on the current (before your patch) refspec semantics and assumes if refspec.pattern is set, then the '*' is at the end. So it will need tweaking.

j.
Previous: Daniel BarkalowNext: Daniel Barkalow
Message 2 of 9 in “Extend pattern refspecs”
  1. 0/5 Extend pattern refspecsDaniel Barkalow, Mar 6, 2009
  2. Jay SoffianMar 6, 2009
  3. Daniel BarkalowMar 6, 2009
  4. Jay SoffianMar 6, 2009
  5. Daniel BarkalowMar 6, 2009
  6. Jay SoffianMar 6, 2009
  7. Junio C HamanoMar 8, 2009
  8. Daniel BarkalowMar 8, 2009
  9. Jay SoffianMar 9, 2009

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.