On Wed, Feb 08, 2023 at 09:40:06AM -0800, Junio C Hamano wrote: > > Likewise, something more elaborate like full-path globbing or even > > regex matching would be possible, but would need to be activated by an > > option. > > True. We should be able to do a bit better than just tail-matching > with an option. > > I would not recommend sending over regex as protocol capability the > same way as ref-prefix works, unless we adopt something that can > match linear-time like re2 and use it everywhere, as you can send a > pattern that is deliberately made inefficient to inconvenience the > other side. Yeah, I should not even have mentioned regex. It was really meant as "if you really wanted to go wild, you could do something as crazy as regexes". But I agree that we would never want to pass regexes over the wire. If we want to make things more efficient, prefix-matching is the way. If we want to make things more ergonomic for the client-side user, then we should stick to globbing (which we already do, but we could do things like full-string globs rather than strict tail-matching). But I would hold off on all of that until somebody has a concrete case that shows why their preferred matching scheme is useful. -Peff