summaryrefslogtreecommitdiff
path: root/t/t1002-read-tree-m-u-2way.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2022-03-16 17:53:09 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2022-03-16 17:53:09 -0700
commitea05fd5fbf7c28200de22cf06efee3a987dc1244 (patch)
tree17e40fd7de2ebd46e7c9637950a0317bae0bd32c /t/t1002-read-tree-m-u-2way.sh
parentMerge branch 'tk/t7063-chmtime-dirs-too' (diff)
parentrev-list simplify tests: don't ignore "git" exit code (diff)
downloadtgif-ea05fd5fbf7c28200de22cf06efee3a987dc1244.tar.xz
Merge branch 'ab/keep-git-exit-codes-in-tests'
Updates tests around the use of "test $(git cmd) = constant". * ab/keep-git-exit-codes-in-tests: rev-list simplify tests: don't ignore "git" exit code checkout tests: don't ignore "git <cmd>" exit code apply tests: don't ignore "git ls-files" exit code, drop sub-shell gettext tests: don't ignore "test-tool regex" exit code rev-list tests: don't hide abort() in "test_expect_failure" diff tests: don't ignore "git rev-list" exit code notes tests: don't ignore "git" exit code rev-parse tests: don't ignore "git reflog" exit code merge tests: use "test_must_fail" instead of ad-hoc pattern apply tests: use "test_must_fail" instead of ad-hoc pattern diff tests: don't ignore "git diff" exit code in "read" loop diff tests: don't ignore "git diff" exit code read-tree tests: check "diff-files" exit code on failure tests: use "test_stdout_line_count", not "test $(git [...] | wc -l)" tests: change some 'test $(git) = "x"' to test_cmp
Diffstat (limited to 't/t1002-read-tree-m-u-2way.sh')
-rwxr-xr-xt/t1002-read-tree-m-u-2way.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t1002-read-tree-m-u-2way.sh b/t/t1002-read-tree-m-u-2way.sh
index ca5c5510c7..46cbd5514a 100755
--- a/t/t1002-read-tree-m-u-2way.sh
+++ b/t/t1002-read-tree-m-u-2way.sh
@@ -9,7 +9,6 @@ This is identical to t1001, but uses -u to update the work tree as well.
'
-TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-read-tree.sh
@@ -23,11 +22,12 @@ compare_change () {
}
check_cache_at () {
- clean_if_empty=$(git diff-files -- "$1")
+ git diff-files -- "$1" >out &&
+ clean_if_empty=$(cat out) &&
case "$clean_if_empty" in
'') echo "$1: clean" ;;
?*) echo "$1: dirty" ;;
- esac
+ esac &&
case "$2,$clean_if_empty" in
clean,) : ;;
clean,?*) false ;;