diff options
author | Denton Liu <liu.denton@gmail.com> | 2019-11-12 15:08:07 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-11-21 09:41:51 +0900 |
commit | 5540ed27bcf30869b2f56e421cb9f52520d2c0a0 (patch) | |
tree | c33b7ee77ab3f464c07466a77dc43ddfa2c6cd14 /builtin/commit.c | |
parent | dd0f1e767b79009f5edd01d3c917f1cf186e60c9 (diff) |
t5520: test single-line files by git with test_cmp
In case an invocation of a git command fails within the command
substitution, the failure will be masked. Replace the command
substitution with a file-redirection and a call to test_cmp.
This change was done with the following GNU sed expressions:
s/\(\s*\)test \([^ ]*\) = "$(\(git [^)]*\))"/\1echo \2 >expect \&\&\n\1\3 >actual \&\&\n\1test_cmp expect actual/
s/\(\s*\)test "$(\(git [^)]*\))" = \([^ ]*\)/\1echo \3 >expect \&\&\n\1\2 >actual \&\&\n\1test_cmp expect actual/
A future patch will clean up situations where we have multiple duplicate
statements within a test case. This is done to keep this patch purely
mechanical.
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