summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-07-02 19:53:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-07-02 19:53:07 (GMT)
commit6f92e5ff3cdc813de8ef5327fd4bad492fb7d6c9 (patch)
treeb234a0801feb54824d81d3f35b8a1620bba0ae75 /t
parenta02ad882a17b9d45f63ea448391ac5e9f7948222 (diff)
parent745224e04a03e4544c58d5d38d3c54f67100f8eb (diff)
downloadgit-6f92e5ff3cdc813de8ef5327fd4bad492fb7d6c9.zip
git-6f92e5ff3cdc813de8ef5327fd4bad492fb7d6c9.tar.gz
git-6f92e5ff3cdc813de8ef5327fd4bad492fb7d6c9.tar.bz2
Merge branch 'dt/refs-check-refname-component-sse'
Further micro-optimization of a leaf-function. * dt/refs-check-refname-component-sse: refs.c: SSE2 optimizations for check_refname_component
Diffstat (limited to 't')
-rwxr-xr-xt/t1402-check-ref-format.sh15
-rw-r--r--t/valgrind/default.supp8
2 files changed, 23 insertions, 0 deletions
diff --git a/t/t1402-check-ref-format.sh b/t/t1402-check-ref-format.sh
index 1a5a5f3..9aeb352 100755
--- a/t/t1402-check-ref-format.sh
+++ b/t/t1402-check-ref-format.sh
@@ -64,6 +64,7 @@ valid_ref "$(printf 'heads/fu\303\237')"
invalid_ref 'heads/*foo/bar' --refspec-pattern
invalid_ref 'heads/foo*/bar' --refspec-pattern
invalid_ref 'heads/f*o/bar' --refspec-pattern
+invalid_ref 'heads/foo*//bar' --refspec-pattern
ref='foo'
invalid_ref "$ref"
@@ -128,6 +129,20 @@ valid_ref NOT_MINGW "$ref" '--allow-onelevel --normalize'
invalid_ref NOT_MINGW "$ref" '--refspec-pattern --normalize'
valid_ref NOT_MINGW "$ref" '--refspec-pattern --allow-onelevel --normalize'
+
+valid_ref 'refs/heads/a-very-long-refname'
+invalid_ref 'refs/heads/.a-very-long-refname'
+invalid_ref 'refs/heads/abcdefgh0123..'
+invalid_ref 'refs/heads/abcdefgh01234..'
+invalid_ref 'refs/heads/abcdefgh012345..'
+invalid_ref 'refs/heads/abcdefgh0123456..'
+invalid_ref 'refs/heads/abcdefgh01234567..'
+valid_ref 'refs/heads/abcdefgh0123.a'
+valid_ref 'refs/heads/abcdefgh01234.a'
+valid_ref 'refs/heads/abcdefgh012345.a'
+valid_ref 'refs/heads/abcdefgh0123456.a'
+valid_ref 'refs/heads/abcdefgh01234567.a'
+
test_expect_success "check-ref-format --branch @{-1}" '
T=$(git write-tree) &&
sha1=$(echo A | git commit-tree $T) &&
diff --git a/t/valgrind/default.supp b/t/valgrind/default.supp
index 0a6724f..332ab1a 100644
--- a/t/valgrind/default.supp
+++ b/t/valgrind/default.supp
@@ -49,3 +49,11 @@
Memcheck:Addr4
fun:copy_ref
}
+{
+ ignore-sse-check_refname_format
+ Memcheck:Addr8
+ fun:check_refname_format
+ fun:cmd_check_ref_format
+ fun:handle_builtin
+ fun:main
+}