tests: modernize the test script t0010-racy-git.sh

Modernize the formatting of the test script to align with current standards and improve its overall readability. Signed-off-by: Aryan Gupta <garyan447@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Aryan Gupta committed Mar 5, 2024 at 22:09 UTC 1605035217e137bc446ce0d64ffa9575dda810ee
1 file changed +15 -16
t/t0010-racy-git.sh
+15 -16
@@ -10,25 +10,24 @@ TEST_PASSES_SANITIZE_LEAK=true
10
11 for trial in 0 1 2 3 4
12 do
13 - rm -f .git/index
14 - echo frotz >infocom
15 - git update-index --add infocom
16 - echo xyzzy >infocom
17 -
18 - files=$(git diff-files -p)
19 - test_expect_success \
20 - "Racy GIT trial #$trial part A" \
21 - 'test "" != "$files"'
22 -
13 + test_expect_success "Racy git trial #$trial part A" '
14 + rm -f .git/index &&
15 + echo frotz >infocom &&
16 + git update-index --add infocom &&
17 + echo xyzzy >infocom &&
18 +
19 + git diff-files -p >out &&
20 + test_file_not_empty out
21 + '
22 sleep 1
24 - echo xyzzy >cornerstone
25 - git update-index --add cornerstone
23
27 - files=$(git diff-files -p)
28 - test_expect_success \
29 - "Racy GIT trial #$trial part B" \
30 - 'test "" != "$files"'
24 + test_expect_success "Racy git trial #$trial part B" '
25 + echo xyzzy >cornerstone &&
26 + git update-index --add cornerstone &&
27
28 + git diff-files -p >out &&
29 + test_file_not_empty out
30 + '
31 done
32
33 test_done