Raw
1 test_expect_success 'loop-detect-failure' '
2 git init r1 &&
3 # LINT: loop handles failure explicitly with "|| return 1"
4 for n in 1 2 3 4 5
5 do
6 echo "This is file: $n" > r1/file.$n &&
7 git -C r1 add file.$n &&
8 git -C r1 commit -m "$n" || return 1
9 done &&
10
11 git init r2 &&
12 # LINT: loop fails to handle failure explicitly with "|| return 1"
13 for n in 1000 10000
14 do
15 printf "%"$n"s" X > r2/large.$n &&
16 git -C r2 add large.$n &&
17 git -C r2 commit -m "$n"
18 done
19 '