Re: [PATCH 1/3] var: add support for listing the shell

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

 



On 2023-06-22 at 20:42:31, Eric Sunshine wrote:
> This can be implemented more simply without a temporary file:
> 
>     shpath=$(git var GIT_SHELL_PATH) &&
>     test -x "$shpath"
> 
> This is safe since the exit code of the Git command is preserved
> across the `shpath=...` assignment.

I can do this in v2.

> Similarly, there is no need for a temporary file or an extra process.
> This can all be done entirely in the shell itself:
> 
>     shpath=$(git var GIT_SHELL_PATH) &&
>     case "$shpath" in
>     *sh) ;;
>     *) return 1
>     esac

That's true, but this is much uglier and harder to read.
-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA

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