Re: [PATCH v2] fetch-pack: support negotiation tip whitelist
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- Jun 28, 2018, 16:12 UTC
- Message-ID
- <20180628161216.68872-1-jonathantanmy@google.com>
- In-Reply-To
- <20180628155630.GL19910@google.com>
Show 10 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/*, 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.