Re: [PATCH v3 5/6] am: Fix launching of pager

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Feb 14, 2010 at 09:25:33PM -0600, Jonathan Nieder wrote:

> --- a/git-sh-setup.sh
> +++ b/git-sh-setup.sh
> @@ -107,6 +107,25 @@ git_editor() {
>  	eval "$GIT_EDITOR" '"$@"'
>  }
>  
> +git_pager() {
> +	if test -z "${GIT_PAGER+set}"
> +	then
> +		if tty <&1 >/dev/null 2>/dev/null

We seem to use "test -t 1" for this elsewhere, and I don't see us using
"tty" anywhere else. It is POSIX, and I tested that even Solaris 8 and
AIX 6.1 have it. So I don't think it is a portability issue, but others
may know more than I.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]