summaryrefslogtreecommitdiff
path: root/git-rebase--am.sh
diff options
context:
space:
mode:
authorLibravatar Richard Hansen <rhansen@bbn.com>2015-01-06 17:57:51 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-01-07 10:38:01 -0800
commit102fc80d32094ad6598b17ab9d607516ee8edc4a (patch)
tree7740cee5fc1b3946cbf292f6726b422e2b1a4cb0 /git-rebase--am.sh
parenttest-lib: use 'test ...' instead of '[ ... ]' (diff)
downloadtgif-102fc80d32094ad6598b17ab9d607516ee8edc4a.tar.xz
test-lib.sh: do tests for color support after changing HOME
If ncurses needs ~/.terminfo for the current $TERM, then tput will succeed before changing HOME to $TRASH_DIRECTORY but fail afterward. Move the tests that determine whether there is color support after changing HOME so that color=t is set if and only if tput would succeed when say_color() is run. Note that color=t is now set after --no-color is processed, so the condition to set color=t has changed: it is now set only if color has not already been set to the empty string by --no-color. This disables color support for those that need ~/.terminfo for their TERM, but it's better than filling the screen with: tput: unknown terminal "custom-terminal-name-here" An alternative would be to symlink or copy the user's terminfo database into $TRASH_DIRECTORY, but this is tricky due to the lack of a standard name for the terminfo database (for example, instead of a ~/.terminfo directory, NetBSD uses a ~/.terminfo.cdb database file). Signed-off-by: Richard Hansen <rhansen@bbn.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--am.sh')
0 files changed, 0 insertions, 0 deletions