summaryrefslogtreecommitdiff
path: root/t/t4100/t-apply-4.expect
diff options
context:
space:
mode:
authorLibravatar Denton Liu <liu.denton@gmail.com>2019-11-27 11:53:33 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-11-29 13:20:15 -0800
commita29b2429e583794c27d9527e105b1ce7500e8062 (patch)
tree64bf592002d94dff6468321cb97a7b02a9ec68aa /t/t4100/t-apply-4.expect
parentt5317: stop losing return codes of git commands (diff)
downloadtgif-a29b2429e583794c27d9527e105b1ce7500e8062.tar.xz
t5317: use ! grep to check for no matching lines
Several times in t5317, we would use `wc -l` to ensure that a grep result is empty. However, grep already has a way to do that... Its return code! Use `! grep` in the cases where we are ensuring that there are no matching lines. While at it, drop unnecessary invocations of `awk` and `sort` in each affected test since those commands do not influence the outcome. It's not clear why that extra work was being done in the first place, and the code's history doesn't shed any light on the matter since these tests were simply born this way[1], likely due to copy-paste programming. The unnecessary work wasn't noticed even when the code was later touched for various cleanups[2][3]. [1]: 9535ce7337 (pack-objects: add list-objects filtering, 2017-11-21) [2]: bdbc17e86a (tests: standardize pipe placement, 2018-10-05) [3]: 61de0ff695 (tests: don't swallow Git errors upstream of pipes, 2018-10-05) Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4100/t-apply-4.expect')
0 files changed, 0 insertions, 0 deletions