read_info_alternates: warn on non-trivial errors
[alt-git.git] / t / perf / p7300-clean.sh
blob7c1888a27e7fcf090698ec5ac60db72c76fbb807
1 #!/bin/sh
3 test_description="Test git-clean performance"
5 . ./perf-lib.sh
7 test_perf_default_repo
8 test_checkout_worktree
10 test_expect_success 'setup untracked directory with many sub dirs' '
11 rm -rf 500_sub_dirs 100000_sub_dirs clean_test_dir &&
12 mkdir 500_sub_dirs 100000_sub_dirs clean_test_dir &&
13 for i in $(test_seq 1 500)
15 mkdir 500_sub_dirs/dir$i || return $?
16 done &&
17 for i in $(test_seq 1 200)
19 cp -r 500_sub_dirs 100000_sub_dirs/dir$i || return $?
20 done
23 test_perf 'clean many untracked sub dirs, check for nested git' '
24 git clean -n -q -f -d 100000_sub_dirs/
27 test_perf 'clean many untracked sub dirs, ignore nested git' '
28 git clean -n -q -f -f -d 100000_sub_dirs/
31 test_perf 'ls-files -o' '
32 git ls-files -o
35 test_done