Skip to content

Commit 10dae78

Browse files
john-caigitster
authored andcommitted
t7201-co: modernize test format
Some tests still use the old format with four spaces indentation. Standardize the tests to the new format with tab indentation. Signed-off-by: John Cai <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c970681 commit 10dae78

File tree

1 file changed

+46
-46
lines changed

1 file changed

+46
-46
lines changed

t/t7201-co.sh

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -372,75 +372,75 @@ test_expect_success 'checkout specific path while in subdirectory' '
372372
'
373373

374374
test_expect_success 'checkout w/--track sets up tracking' '
375-
git config branch.autosetupmerge false &&
376-
git checkout main &&
377-
git checkout --track -b track1 &&
378-
test "$(git config branch.track1.remote)" &&
379-
test "$(git config branch.track1.merge)"
375+
git config branch.autosetupmerge false &&
376+
git checkout main &&
377+
git checkout --track -b track1 &&
378+
test "$(git config branch.track1.remote)" &&
379+
test "$(git config branch.track1.merge)"
380380
'
381381

382382
test_expect_success 'checkout w/autosetupmerge=always sets up tracking' '
383-
test_when_finished git config branch.autosetupmerge false &&
384-
git config branch.autosetupmerge always &&
385-
git checkout main &&
386-
git checkout -b track2 &&
387-
test "$(git config branch.track2.remote)" &&
388-
test "$(git config branch.track2.merge)"
383+
test_when_finished git config branch.autosetupmerge false &&
384+
git config branch.autosetupmerge always &&
385+
git checkout main &&
386+
git checkout -b track2 &&
387+
test "$(git config branch.track2.remote)" &&
388+
test "$(git config branch.track2.merge)"
389389
'
390390

391391
test_expect_success 'checkout w/--track from non-branch HEAD fails' '
392-
git checkout main^0 &&
393-
test_must_fail git symbolic-ref HEAD &&
394-
test_must_fail git checkout --track -b track &&
395-
test_must_fail git rev-parse --verify track &&
396-
test_must_fail git symbolic-ref HEAD &&
397-
test "z$(git rev-parse main^0)" = "z$(git rev-parse HEAD)"
392+
git checkout main^0 &&
393+
test_must_fail git symbolic-ref HEAD &&
394+
test_must_fail git checkout --track -b track &&
395+
test_must_fail git rev-parse --verify track &&
396+
test_must_fail git symbolic-ref HEAD &&
397+
test "z$(git rev-parse main^0)" = "z$(git rev-parse HEAD)"
398398
'
399399

400400
test_expect_success 'checkout w/--track from tag fails' '
401-
git checkout main^0 &&
402-
test_must_fail git symbolic-ref HEAD &&
403-
test_must_fail git checkout --track -b track frotz &&
404-
test_must_fail git rev-parse --verify track &&
405-
test_must_fail git symbolic-ref HEAD &&
406-
test "z$(git rev-parse main^0)" = "z$(git rev-parse HEAD)"
401+
git checkout main^0 &&
402+
test_must_fail git symbolic-ref HEAD &&
403+
test_must_fail git checkout --track -b track frotz &&
404+
test_must_fail git rev-parse --verify track &&
405+
test_must_fail git symbolic-ref HEAD &&
406+
test "z$(git rev-parse main^0)" = "z$(git rev-parse HEAD)"
407407
'
408408

409409
test_expect_success 'detach a symbolic link HEAD' '
410-
git checkout main &&
411-
git config --bool core.prefersymlinkrefs yes &&
412-
git checkout side &&
413-
git checkout main &&
414-
it=$(git symbolic-ref HEAD) &&
415-
test "z$it" = zrefs/heads/main &&
416-
here=$(git rev-parse --verify refs/heads/main) &&
417-
git checkout side^ &&
418-
test "z$(git rev-parse --verify refs/heads/main)" = "z$here"
410+
git checkout main &&
411+
git config --bool core.prefersymlinkrefs yes &&
412+
git checkout side &&
413+
git checkout main &&
414+
it=$(git symbolic-ref HEAD) &&
415+
test "z$it" = zrefs/heads/main &&
416+
here=$(git rev-parse --verify refs/heads/main) &&
417+
git checkout side^ &&
418+
test "z$(git rev-parse --verify refs/heads/main)" = "z$here"
419419
'
420420

421421
test_expect_success 'checkout with --track fakes a sensible -b <name>' '
422-
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" &&
423-
git update-ref refs/remotes/origin/koala/bear renamer &&
422+
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" &&
423+
git update-ref refs/remotes/origin/koala/bear renamer &&
424424
425-
git checkout --track origin/koala/bear &&
426-
test "refs/heads/koala/bear" = "$(git symbolic-ref HEAD)" &&
427-
test "$(git rev-parse HEAD)" = "$(git rev-parse renamer)" &&
425+
git checkout --track origin/koala/bear &&
426+
test "refs/heads/koala/bear" = "$(git symbolic-ref HEAD)" &&
427+
test "$(git rev-parse HEAD)" = "$(git rev-parse renamer)" &&
428428
429-
git checkout main && git branch -D koala/bear &&
429+
git checkout main && git branch -D koala/bear &&
430430
431-
git checkout --track refs/remotes/origin/koala/bear &&
432-
test "refs/heads/koala/bear" = "$(git symbolic-ref HEAD)" &&
433-
test "$(git rev-parse HEAD)" = "$(git rev-parse renamer)" &&
431+
git checkout --track refs/remotes/origin/koala/bear &&
432+
test "refs/heads/koala/bear" = "$(git symbolic-ref HEAD)" &&
433+
test "$(git rev-parse HEAD)" = "$(git rev-parse renamer)" &&
434434
435-
git checkout main && git branch -D koala/bear &&
435+
git checkout main && git branch -D koala/bear &&
436436
437-
git checkout --track remotes/origin/koala/bear &&
438-
test "refs/heads/koala/bear" = "$(git symbolic-ref HEAD)" &&
439-
test "$(git rev-parse HEAD)" = "$(git rev-parse renamer)"
437+
git checkout --track remotes/origin/koala/bear &&
438+
test "refs/heads/koala/bear" = "$(git symbolic-ref HEAD)" &&
439+
test "$(git rev-parse HEAD)" = "$(git rev-parse renamer)"
440440
'
441441

442442
test_expect_success 'checkout with --track, but without -b, fails with too short tracked name' '
443-
test_must_fail git checkout --track renamer
443+
test_must_fail git checkout --track renamer
444444
'
445445

446446
setup_conflicting_index () {

0 commit comments

Comments
 (0)