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

Re: [PATCH v2] fetch-pack: support negotiation tip whitelist

From
BWBrandon Williams <bmwill@google.com>
Date
Jun 28, 2018, 16:16 UTC
Message-ID
<20180628161649.GM19910@google.com>
In-Reply-To
<20180628161216.68872-1-jonathantanmy@google.com>
On 06/28, Jonathan Tan wrote:
Show 15 quoted lines
> > This seems like a pretty difficult to use feature, requiring that I
> > provide the actual OIDs.  I think a much better UI would probably be to
> > accept a number of different things ranging from exact OIDs to actual
> > ref names or even better, allowing for ref-patterns which include globs.
> > That way I can do the following:
> >   
> >   git fetch --negotiation-tip=refs/remotes/my-remote/* my-remote
> > 
> > in order to easily limit the tips to all the refs I have from that
> > particular remote.
> 
> Actual ref names are already supported - it uses the same DWIM as
> others. As for globs, I thought of supporting both DWIM objects and the
> LHS of refspecs, but (1) it might be strange to support master and
> refs/heads/* but not heads/*,

I don't think that would be strange at all, and no where in git do we handle heads/* but we do already handle refs/heads/* as well as DWIM master.

> and (2) I can't think of anywhere in Git
> where you can provide either one - it's either SHA-1 and DWIM name, or
> SHA-1 and refspec, but not all three.
fetch is a perfect example of supporting all three.  I can do
  git fetch origin SHA1
  git fetch origin master
  git fetch origin refs/heads/*:refs/heads/*
-- 
Brandon Williams
Previous: Jonathan TanNext: Jonathan Tan
Message 7 of 14 in “fetch-pack: support negotiation tip whitelist”
  1. fetch-pack: support negotiation tip whitelistJonathan Tan, Jun 25, 2018
  2. Jonathan NiederJun 26, 2018
  3. Junio C HamanoJun 26, 2018
  4. fetch-pack: support negotiation tip whitelistJonathan Tan, Jun 27, 2018
  5. Brandon WilliamsJun 28, 2018
  6. Jonathan TanJun 28, 2018
  7. Brandon WilliamsJun 28, 2018
  8. fetch-pack: support negotiation tip whitelistJonathan Tan, Jun 28, 2018
  9. Brandon WilliamsJun 28, 2018
  10. Junio C HamanoJun 29, 2018
  11. fetch-pack: support negotiation tip whitelistJonathan Tan, Jul 2, 2018
  12. Duy NguyenJul 22, 2018
  13. Ævar Arnfjörð BjarmasonJun 18, 2019
  14. Jonathan TanJun 18, 2019

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.