Re: [PATCH v2] remote helpers: avoid blind fall-back to ".git" when setting GIT_DIR

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

 



> +       mkdir lsremote-root &&
> +       (
> +               GIT_CEILING_DIRECTORIES=$(pwd) &&
> +               export GIT_CEILING_DIRECTORIES &&
> +               cd lsremote-root &&
> +               git ls-remote "$HTTPD_URL/smart/repo.git" >../actual
> +       ) &&

We could avoid the subshell via

GIT_CEILING_DIRECTORIES=$(pwd) \
    git -C lsremote-root lsremote ... >actual

Not sure if it is worth to trade off a block of code (and an extra shell
at run time) for an overly long line.

The rest looks good to me.

Thanks,
Stefan



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