Re: [PATCH 1/8 v2] ssh test: make copy_ssh_wrapper_as clean up after itself
- From
Stefan Beller <sbeller@google.com>
- Date
- Nov 21, 2017, 23:42 UTC
- Message-ID
- <CAGZ79ka6HVtF10K9_t30E0bjRzc+Ac-GZB99fqoU5CVvUjooug@mail.gmail.com>
- In-Reply-To
- <20171121014919.p4cl5esf7evptzbk@aiede.mtv.corp.google.com>
On Mon, Nov 20, 2017 at 5:49 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 6 quoted lines
> @@ -317,7 +317,7 @@ test_expect_success 'set up ssh wrapper' '
>
> copy_ssh_wrapper_as () {
> cp "$TRASH_DIRECTORY/ssh$X" "${1%$X}$X" &&
> - test_when_finished "rm -f ${1%$X}$X" &&
> + test_when_finished "rm $(git rev-parse --sq-quote "${1%$X}$X")" &&I wondered why the line above doesn't need the same treatment, but there the argument is quoted, in this line we cannot use quotation as we are already using it for bundle up the argument for test_when_finished.
The patch looks good. Stefan