aboutsummaryrefslogtreecommitdiff
path: root/t/t1402-check-ref-format.sh
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2011-09-15 23:10:25 +0200
committerJunio C Hamano <gitster@pobox.com>2011-10-05 13:45:29 -0700
commit8d9c50105f908b2adde4b7c77537cf95f19cd893 (patch)
tree91e783b9cca8d2bac7913057b9caf28c948822e1 /t/t1402-check-ref-format.sh
parent9224b73be03845a99f8171c57dc282f806b70f4c (diff)
downloadgit-8d9c50105f908b2adde4b7c77537cf95f19cd893.tar.gz
git-8d9c50105f908b2adde4b7c77537cf95f19cd893.tar.xz
Change check_ref_format() to take a flags argument
Change check_ref_format() to take a flags argument that indicates what is acceptable in the reference name (analogous to "git check-ref-format"'s "--allow-onelevel" and "--refspec-pattern"). This is more convenient for callers and also fixes a failure in the test suite (and likely elsewhere in the code) by enabling "onelevel" and "refspec-pattern" to be allowed independently of each other. Also rename check_ref_format() to check_refname_format() to make it obvious that it deals with refnames rather than references themselves. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1402-check-ref-format.sh')
-rwxr-xr-xt/t1402-check-ref-format.sh6
1 files changed, 1 insertions, 5 deletions
diff --git a/t/t1402-check-ref-format.sh b/t/t1402-check-ref-format.sh
index f551eef37..1cad88f2d 100755
--- a/t/t1402-check-ref-format.sh
+++ b/t/t1402-check-ref-format.sh
@@ -87,11 +87,7 @@ valid_ref "$ref" '--refspec-pattern --allow-onelevel'
ref='*'
invalid_ref "$ref"
-
-#invalid_ref "$ref" --allow-onelevel
-test_expect_failure "ref name '$ref' is invalid with options --allow-onelevel" \
- "test_must_fail git check-ref-format --allow-onelevel '$ref'"
-
+invalid_ref "$ref" --allow-onelevel
invalid_ref "$ref" --refspec-pattern
valid_ref "$ref" '--refspec-pattern --allow-onelevel'