Re: [PATCH 08/12] t9150-svk-mergetickets.sh: use the $( ... ) construct for command substitution
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 12, 2016, 19:59 UTC
- Message-ID
- <xmqq8u3utvpq.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <1452599378-47882-9-git-send-email-gitter.spiros@gmail.com>
Elia Pinto <gitter.spiros@gmail.com> writes:
> test_expect_success 'svk merges were represented coming in' " > - [ `git cat-file commit HEAD | grep parent | wc -l` -eq 2 ] > + [ $(git cat-file commit HEAD | grep parent | wc -l) -eq 2 ] > "
Entirely outside of the theme of this topic, but this should be corrected to use "test".
More importantly, the outer quote should become single quote. As it currently is written, "git cat-file" runs outside the protection of test_expect_success when the command line of the test_expect_success is formulated, which defeats the whole purpose of test helper macros to run everything "git" inside them.