Re: [PATCH v2] fetch-pack: support negotiation tip whitelist
From: Brandon Williams <hidden>
Date: 2018-06-28 16:16:55
On 06/28, Jonathan Tan wrote:
quoted
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