@@ -78,7 +78,7 @@ test_expect_success 'filter subdirectory only' '
7878test_expect_success ' subdirectory filter result looks okay' '
7979 test 2 = $(git rev-list sub | wc -l) &&
8080 git show sub:new &&
81- ! git show sub:subdir
81+ test_must_fail git show sub:subdir
8282'
8383
8484test_expect_success ' setup and filter history that requires --full-history' '
@@ -100,7 +100,7 @@ test_expect_success 'subdirectory filter result looks okay' '
100100 test 3 = $(git rev-list -1 --parents sub-master | wc -w) &&
101101 git show sub-master^:new &&
102102 git show sub-master^2:new &&
103- ! git show sub:subdir
103+ test_must_fail git show sub:subdir
104104'
105105
106106test_expect_success ' use index-filter to move into a subdirectory' '
@@ -114,7 +114,7 @@ test_expect_success 'use index-filter to move into a subdirectory' '
114114
115115test_expect_success ' stops when msg filter fails' '
116116 old=$(git rev-parse HEAD) &&
117- ! git-filter-branch -f --msg-filter false HEAD &&
117+ test_must_fail git-filter-branch -f --msg-filter false HEAD &&
118118 test $old = $(git rev-parse HEAD) &&
119119 rm -rf .git-rewrite
120120'
@@ -151,8 +151,8 @@ test_expect_success "remove a certain author's commits" '
151151'
152152
153153test_expect_success ' barf on invalid name' '
154- ! git filter-branch -f master xy-problem &&
155- ! git filter-branch -f HEAD^
154+ test_must_fail git filter-branch -f master xy-problem &&
155+ test_must_fail git filter-branch -f HEAD^
156156'
157157
158158test_expect_success ' "map" works in commit filter' '
@@ -174,7 +174,7 @@ test_expect_success 'Name needing quotes' '
174174 git add foo &&
175175 git commit -m "Adding a file" &&
176176 git filter-branch --tree-filter "rm -fr foo" &&
177- ! git ls-files --error-unmatch "foo/$name" &&
177+ test_must_fail git ls-files --error-unmatch "foo/$name" &&
178178 test $(git rev-parse --verify rerere) != $(git rev-parse --verify A)
179179
180180'
0 commit comments