Re: [PATCH] test-lib: try harder to ensure a working jgit

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

 



On Tue, May 14, 2019 at 04:45:34AM -0400, Jeff King wrote:
> On Tue, May 14, 2019 at 02:14:19AM +0000, brian m. carlson wrote:
> > I think this is an improvement, not only because of the reasons you
> > mentioned, but because we remove the use of "type", which is not
> > guaranteed to be present in a POSIX shell.
> 
> Isn't it? I have always treated it as the most-portable option for this
> (compared to, say, `which`).  It is in POSIX as a utility (albeit marked
> with XSI), which even says (in APPLICATION USAGE):
> 
>   Since type must be aware of the contents of the current shell
>   execution environment (such as the lists of commands, functions, and
>   built-ins processed by hash), it is always provided as a shell regular
>   built-in.

It's an XSI extension, while "command -v" is not. "type" may be more
common for historical reasons, but if you have systems that don't
implement XSI, "command -v" is the way to go.

I suppose this doesn't matter unless we have people try to build with
Debian's posh package, which only implements the minimum requirements
for a Debian /bin/sh (which don't include XSI extensions, but do include
local).

> All that said, I think Todd's patch makes perfect sense even without
> wanting to avoid "type".

I agree this is an improvement either way.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

Attachment: signature.asc
Description: PGP signature


[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]

  Powered by Linux