summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2019-11-12 15:08:02 -0800
committerJunio C Hamano <gitster@pobox.com>2019-11-21 09:41:51 +0900
commit979f8891cca562f0af7044ff9ade9f3e5caa3be5 (patch)
treed1278d31365442e516c8274bd54a95a8c29fbb7d /builtin/commit.c
parent3037d3db90c994cb3e5913a54f83acdefc219174 (diff)
t5520: replace test -{n,z} with test-lib functions
When wrapping a git command in a command substitution within another command, we throw away the git command's exit code. In case the git command fails, we would like to know about it rather than the failure being silent. Extract git commands so that their exit codes are not lost. Instead of using `test -n` or `test -z`, replace them respectively with invocations of test_file_not_empty() and test_must_be_empty() so that we get better debugging information in the case of a failure. 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