t5520: use test_cmp_rev where possible
authorDenton Liu <redacted>
Tue, 12 Nov 2019 23:08:05 +0000 (15:08 -0800)
committerJunio C Hamano <redacted>
Thu, 21 Nov 2019 00:41:51 +0000 (09:41 +0900)
commitdd0f1e767b79009f5edd01d3c917f1cf186e60c9
treeee36c984040177fe45faa7bacb403853308f91f0
parent979f8891cca562f0af7044ff9ade9f3e5caa3be5
t5520: use test_cmp_rev where possible

In case an invocation of `git rev-list` fails within the command
substitution, the failure will be masked. Remove the command
substitution and use test_cmp_rev() so that failures can be discovered.

This change was done with the following sed expressions:

s/test "$(git rev-parse.* \([^)]*\))" = "$(git rev-parse \([^)]*\))"/test_cmp_rev \1 \2/
s/test \([^ ]*\) = "$(git rev-parse.* \([^)]*\))"/test_cmp_rev \1 \2/
s/test "$(git rev-parse.* \([^)]*\))" != "$(git rev-parse.* \([^)]*\))"/test_cmp_rev ! \1 \2/
s/test \([^ ]*\) != "$(git rev-parse.* \([^)]*\))"/test_cmp_rev ! \1 \2/

Signed-off-by: Denton Liu <redacted>
Signed-off-by: Junio C Hamano <redacted>
t/t5520-pull.sh
git clone https://git.99rst.org/PROJECT