summaryrefslogtreecommitdiff
path: root/environment.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2011-09-15 23:10:23 +0200
committerJunio C Hamano <gitster@pobox.com>2011-10-05 13:45:29 -0700
commite4ed6105ec4a8507d4bd9f6355647fa911e4731f (patch)
tree03ee023d4149ef9f571514600805877d1351fcaa /environment.c
parentf9b1a5b9b8aab5d544666ca2aa227528f00484f1 (diff)
downloadgit-e4ed6105ec4a8507d4bd9f6355647fa911e4731f.tar.gz
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 <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'environment.c')
0 files changed, 0 insertions, 0 deletions