Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t3205-branch-color.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t3205-branch-color.sh` 44 lines ยท 1143 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='basic branch output coloring' 4 . ./test-lib.sh 5 6 test_expect_success 'set up some sample branches' ' 7 test_commit foo && 8 git branch -M main && 9 git update-ref refs/remotes/origin/main HEAD && 10 git update-ref refs/heads/other HEAD 11 ' 12 13 # choose non-default colors to make sure config 14 # is taking effect 15 test_expect_success 'set up some color config' ' 16 git config color.branch.local blue && 17 git config color.branch.remote yellow && 18 git config color.branch.current cyan 19 ' 20 21 test_expect_success 'regular output shows colors' ' 22 cat >expect <<-\EOF && 23 * main 24 other 25 remotes/origin/main 26 EOF 27 git branch --color -a >actual.raw && 28 test_decode_color actual && 29 test_cmp expect actual 30 ' 31 32 test_expect_success 'verbose output shows colors' ' 33 oid=$(git rev-parse --short HEAD) && 34 cat >expect <<-EOF && 35 * main $oid foo 36 other $oid foo 37 remotes/origin/main $oid foo 38 EOF 39 git branch --color -v -a >actual.raw && 40 test_decode_color actual && 41 test_cmp expect actual 42 ' 43 44 test_done