mirror of
https://github.com/git/git.git
synced 2026-03-14 18:59:04 +01:00
This changes the pattern matching code to not store the required final / before the *, and then to require each side to be a valid ref (or empty). In particular, any refspec that looks like it should be a pattern but doesn't quite meet the requirements will be found to be invalid as a fallback non-pattern. This was cherry picked from commitef00d15(Tighten refspec processing, 2008-03-17), and two fix-up commits46220ca(remote.c: Fix overtight refspec validation, 2008-03-20) and7d19da4(refspec: allow colon-less wildcard "refs/category/*", 2008-03-25) squashed in. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2.8 KiB
2.8 KiB