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

Re: [PATCH 3/4] fetch-pack: match refs exactly

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 15, 2011, 21:46 UTC
Message-ID
<7vaa6tmrtd.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20111213004808.GC3699@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> This is obviously the one that can break existing fetch-pack users. I
> doubt they exist. If they do, there are a few alternatives:
>
>   1. Come up with some more sane rules for path_match (e.g., try full
>      strings first, use full-string matching for things starting with
>      "refs/", etc).
>
>   2. Leave the matching in-place for git-fetch-pack, but use exact
>      matching for internal users that will always provide qualified refs
>      (i.e., "git fetch").

I think the latter is the sane thing to do _if_ this becomes an issue, and as you mention, it is in line with what "git fetch" wrapper already does.

Given that fetch-pack was meant to be driven by "git fetch" wrapper that turns the command line and other refspecs into full refnames on the remote end before calling it, and also as you mentionied that it is clearly documented as "relative to $GIT_DIR", I do not think we should support the tail-match semantics at all in the first place.

Previous: Jeff KingNext: Jeff King
Message 6 of 8 in “exact ref-matching for fetch-pack”
  1. 0/4 exact ref-matching for fetch-packJeff King, Dec 13, 2011
  2. 1/4 drop "match" parameter from get_remote_headsJeff King, Dec 13, 2011
  3. 2/4 t5500: give fully-qualified refs to fetch-packJeff King, Dec 13, 2011
  4. 3/4 fetch-pack: match refs exactlyJeff King, Dec 13, 2011
  5. Jeff KingDec 13, 2011
  6. Junio C HamanoDec 15, 2011
  7. 4/4 connect.c: drop path_match functionJeff King, Dec 13, 2011
  8. Michael HaggertyDec 13, 2011

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.