Git fork
at reftables-rust 19 lines 455 B view raw
1test_expect_success 'loop-detect-failure' ' 2git init r1 && 3# LINT: loop handles failure explicitly with "|| return 1" 4for n in 1 2 3 4 5 5do 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 9done && 10 11git init r2 && 12# LINT: loop fails to handle failure explicitly with "|| return 1" 13for n in 1000 10000 14do 15 printf "%"$n"s" X > r2/large.$n && 16 git -C r2 add large.$n && 17 git -C r2 commit -m "$n" 18done 19'