diff options
author | René Scharfe <l.s.r@web.de> | 2019-11-27 07:51:43 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-11-27 10:05:27 (GMT) |
commit | ed254710eee0a5fcde1057593d181d40b02922e1 (patch) | |
tree | 23299046b8f2dba950f869e839d39c4ab4de72bb /t/t1011-read-tree-sparse-checkout.sh | |
parent | 213dabf49dc53ae5808efbdebf0cd2bfc2c1bfa8 (diff) | |
download | git-ed254710eee0a5fcde1057593d181d40b02922e1.zip git-ed254710eee0a5fcde1057593d181d40b02922e1.tar.gz git-ed254710eee0a5fcde1057593d181d40b02922e1.tar.bz2 |
test: use test_must_be_empty F instead of test_cmp empty F
Use test_must_be_empty instead of comparing it to an empty file. That's
more efficient, as the function only needs built-in meta-data only check
in the usual case, and provides nicer debug output otherwise.
Helped-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1011-read-tree-sparse-checkout.sh')
-rwxr-xr-x | t/t1011-read-tree-sparse-checkout.sh | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/t/t1011-read-tree-sparse-checkout.sh b/t/t1011-read-tree-sparse-checkout.sh index ba71b15..eb44baf 100755 --- a/t/t1011-read-tree-sparse-checkout.sh +++ b/t/t1011-read-tree-sparse-checkout.sh @@ -215,7 +215,6 @@ test_expect_success 'read-tree adds to worktree, dirty case' ' ' test_expect_success 'index removal and worktree narrowing at the same time' ' - >empty && echo init.t >.git/info/sparse-checkout && echo sub/added >>.git/info/sparse-checkout && git checkout -f top && @@ -223,7 +222,7 @@ test_expect_success 'index removal and worktree narrowing at the same time' ' git checkout removed && git ls-files sub/added >result && test ! -f sub/added && - test_cmp empty result + test_must_be_empty result ' test_expect_success 'read-tree --reset removes outside worktree' ' |