From: Michael Haggerty Date: Thu, 15 Sep 2011 21:10:23 +0000 (+0200) Subject: git check-ref-format: add options --allow-onelevel and --refspec-pattern X-Git-Tag: v1.7.8-rc0~107^2~20 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/e4ed6105ec4a8507d4bd9f6355647fa911e4731f?hp=e4ed6105ec4a8507d4bd9f6355647fa911e4731f git check-ref-format: add options --allow-onelevel and --refspec-pattern Also add tests of the new options. (Actually, one big reason to add the new options is to make it easy to test check_ref_format(), though the options should also be useful to other scripts.) Interpret the result of check_ref_format() based on which types of refnames are allowed. However, because check_ref_format() can only return a single value, one test case is still broken. Specifically, the case "git check-ref-format --onelevel '*'" incorrectly succeeds because check_ref_format() returns CHECK_REF_FORMAT_ONELEVEL for this refname even though the refname is also CHECK_REF_FORMAT_WILDCARD. The type of check that leads to this failure is used elsewhere in "real" code and could lead to bugs; it will be fixed over the next few commits. Signed-off-by: Michael Haggerty Signed-off-by: Junio C Hamano ---