Re: [PATCH v2] remote helpers: avoid blind fall-back to ".git" when setting GIT_DIR
- From
Stefan Beller <sbeller@google.com>
- Date
- Dec 30, 2016, 00:37 UTC
- Message-ID
- <CAGZ79kZiR7grGeMrMFRuQQ0kW6eQ4m=ZizGHDbT-s14iAj8hWQ@mail.gmail.com>
- In-Reply-To
- <20161230001114.GB7883@aiede.mtv.corp.google.com>
Show 7 quoted lines
> + 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 ... >actualNot 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