Re: [PATCH 2/2] refs: loosen restriction on wildcard "*" refspecs
flat view
From: Eric Sunshine <hidden>
Date: 2016-06-15 23:05:52
On Wed, Jul 22, 2015 at 5:05 PM, Jacob Keller [off-list ref] wrote:
From: Jacob Keller <redacted> Modify logic of check_refname_component and add a new disposition regarding "*". Allow refspecs that contain a single "*" if REFNAME_REFSPEC_PATTERN is set. Change the function to pass the flags as a pointer, and clear REFNAME_REFSPEC_PATTERN after the first "*" so that only a single "*" is accepted. This loosens restrictions on refspecs by allowing patterns that have a "*" within a component instead of only as the whole component. Also remove the code that hangled refspec patterns in check_refname_format
s/hangled/handled/
since it is now handled via the check_refname_component logic. Now refs such as `for/bar*:foo/bar*` and even `foo/bar*:foo/baz*` will be accepted. This allows users more control over what is fetched where. Since users must modify the default by hand to make use of this functionality it is not considered a large risk. Any refspec which functioned before shall continue functioning with the new logic. Signed-off-by: Jacob Keller <redacted>