git-web--browse: recognize any TERM_PROGRAM as a GUI terminal on OS X
commitbe537e43ca8c6e38a3cf7024b28d6daf54611132
authorJohn Szakmeister <john@szakmeister.net>
Mon, 25 Mar 2013 10:13:18 +0000 (25 06:13 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 29 Mar 2013 22:24:31 +0000 (29 15:24 -0700)
treed465ab538aa5e20b3a4d69c296cbf94d1e67b113
parent7b592fadf1e23b10b913e0771b9f711770597266
git-web--browse: recognize any TERM_PROGRAM as a GUI terminal on OS X

It turns out that the presence of SECURITYSESSIONID is not sufficient
for detecting the presence of a GUI under Mac OS X.  SECURITYSESSIONID
appears to only be set when the user has Screen Sharing enabled.
Disabling Screen Sharing and relaunching the shell showed that the
variable was missing, at least under Mac OS X 10.6.8.

On the other hand, TERM_PROGRAM seems to be set for any terminals on
OS X, so just check it is set to something, instead of hardcoding
"Apple_Terminal" and missing other terminals such as iTerm.app.

Signed-off-by: John Szakmeister <john@szakmeister.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-web--browse.sh