This series only supports the narrowest case of having the * in the middle of a side of a refspec: having it as a full path component on each side. Patches 1-3 centralize all of the parsing and matching rules to a pair of functions; patch 4 makes the stored representation more convenient (and serves as a distinguished bisection outcome for anything I missed that was relying on the contents of struct refspec for patterns); and patch 5 extends the matching implementation and loosens the ref format requirements to allow the * to be in the middle. An easy followup would relax the restrictions further without requiring any particularly tricky further changes. Daniel Barkalow (5): Make clone parse the default fetch refspec with the regular code Use a single function to match names against patterns Use the matching function to generate the match results Keep '*' in pattern refspecs Support '*' in the middle of a refspec builtin-clone.c | 25 ++++++++-------- refs.c | 15 +++++---- remote.c | 78 +++++++++++++++++++++++++++++---------------------- t/t5511-refspec.sh | 12 ++++++++ 4 files changed, 77 insertions(+), 53 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html