summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2019-11-12 15:08:05 -0800
committerJunio C Hamano <gitster@pobox.com>2019-11-21 09:41:51 +0900
commitdd0f1e767b79009f5edd01d3c917f1cf186e60c9 (patch)
treeee36c984040177fe45faa7bacb403853308f91f0 /builtin/commit.c
parent979f8891cca562f0af7044ff9ade9f3e5caa3be5 (diff)
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 <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions