Merge branch 'ds/include-exclude'
[gitweb.git] / t / t3305-notes-fanout.sh
index 54460beec469c0d3fe5db57508b6b762fd540cf2..831f83d211b8c731558a717bb2b615e414b7022a 100755 (executable)
@@ -35,15 +35,10 @@ test_expect_success 'many notes created with git-notes triggers fanout' '
        git ls-tree -r --name-only refs/notes/commits |
        while read path
        do
-               case "$path" in
-               ??/??????????????????????????????????????)
-                       : true
-                       ;;
-               *)
+               echo $path | grep "^../[0-9a-f]*$" || {
                        echo "Invalid path \"$path\"" &&
-                       return 1
-                       ;;
-               esac
+                       return 1;
+               }
        done
 '
 
@@ -77,15 +72,10 @@ test_expect_success 'deleting most notes triggers fanout consolidation' '
        git ls-tree -r --name-only refs/notes/commits |
        while read path
        do
-               case "$path" in
-               ????????????????????????????????????????)
-                       : true
-                       ;;
-               *)
+               echo $path | grep -v "^../.*" || {
                        echo "Invalid path \"$path\"" &&
-                       return 1
-                       ;;
-               esac
+                       return 1;
+               }
        done
 '