#!/bin/sh # # Copyright (c) 2010 Nazri Ramliy # test_description='Test for "git log --decorate" colors' . ./test-lib.sh get_color () { git config --get-color no.such.slot "$1" } test_expect_success setup ' git config diff.color.commit yellow && git config color.decorate.branch green && git config color.decorate.remoteBranch red && git config color.decorate.tag "reverse bold yellow" && git config color.decorate.stash magenta && git config color.decorate.HEAD cyan && c_reset=$(get_color reset) && c_commit=$(get_color yellow) && c_branch=$(get_color green) && c_remoteBranch=$(get_color red) && c_tag=$(get_color "reverse bold yellow") && c_stash=$(get_color magenta) && c_HEAD=$(get_color cyan) && test_commit A && git clone . other && ( cd other && test_commit A1 ) && git remote add -f other ./other && test_commit B && git tag v1.0 && echo >>A.t && git stash save Changes to A.t ' cat >expected <out && test_cmp expected out ' test_done