aboutsummaryrefslogtreecommitdiff
path: root/http.h
diff options
context:
space:
mode:
authorRichard Hansen <rhansen@bbn.com>2015-06-17 17:11:21 -0400
committerJunio C Hamano <gitster@pobox.com>2015-06-17 15:16:52 -0700
commitd5c1b7c286b2ad2206afe2f86ae228744bd283fb (patch)
treed840470a756e517a3ae11ab0cc104c2d4e7ae60c /http.h
parentca92a660bf085efd8867861b4d80d95659dd49a3 (diff)
downloadgit-d5c1b7c286b2ad2206afe2f86ae228744bd283fb.tar.gz
git-d5c1b7c286b2ad2206afe2f86ae228744bd283fb.tar.xz
test-lib.sh: fix color support when tput needs ~/.terminfo
If tput needs ~/.terminfo for the current $TERM, then tput will succeed before HOME is changed to $TRASH_DIRECTORY (causing color to be set to 't') but fail afterward. One possible way to fix this is to treat HOME like TERM: back up the original value and temporarily restore it before say_color() runs tput. Instead, pre-compute and save the color control sequences before changing either TERM or HOME. Use the saved control sequences in say_color() rather than call tput each time. This avoids the need to back up and restore the TERM and HOME variables, and it avoids the overhead of a subshell and two invocations of tput per call to say_color(). Signed-off-by: Richard Hansen <rhansen@bbn.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.h')
0 files changed, 0 insertions, 0 deletions