From: Eric Sunshine Date: Thu, 23 Jul 2015 22:00:55 GMT Subject: Re: [PATCH 2/2] refs: loosen restriction on wildcard "*" refspecs Message-ID: In-Reply-To: <1437599133-13012-3-git-send-email-jacob.e.keller@intel.com> On Wed, Jul 22, 2015 at 5:05 PM, Jacob Keller wrote: > From: Jacob Keller > > 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