Re: [PATCH v4 00/34] Add directory rename detection to git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Elijah Newren <newren@xxxxxxxxx> writes:

> This patchset introduces directory rename detection to merge-recursive.

The use of negated form of test_i18ngrep in these patches are all
wrong.  Because the helper must say "even though the string does not
match (does match), the test expects it to match (does not match),
and we know that expectation won't hold simply because we are under
poison build", so negating the result of test_i18ngrep won't work.
Instead, you would tell test_i18ngrep that we do not expect it to
find matching lines.

Even with the attached, test #70 will still fail because you have a
construct that greps in output of test_i18ngrep.  That won't work
under poison build, because the output of test_i18ngrep won't have
the string you are looking for under poison build.

We may probably want to redirect the output of underlying grep to
/dev/null in test_i18ngrep to make this kind of misuse easier to
spot.

 t/t6043-merge-rename-directories.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh
index f64c7d273b..8f58f08ed2 100755
--- a/t/t6043-merge-rename-directories.sh
+++ b/t/t6043-merge-rename-directories.sh
@@ -554,7 +554,7 @@ test_expect_success '2b-check: Directory split into two on one side, with equal
 		git rev-parse >expect \
 			O:z/b O:z/c B:x/d &&
 		test_cmp expect actual &&
-		! test_i18ngrep "CONFLICT.*directory rename split" out
+		test_i18ngrep ! "CONFLICT.*directory rename split" out
 	)
 '
 
@@ -705,7 +705,7 @@ test_expect_success '3b-check: Avoid implicit rename if involved as source on cu
 		test_cmp expect actual &&
 
 		test_i18ngrep CONFLICT.*rename/rename.*z/d.*x/d.*w/d out &&
-	! test_i18ngrep CONFLICT.*rename/rename.*y/d
+		test_i18ngrep ! CONFLICT.*rename/rename.*y/d
 	)
 '
 
@@ -3146,7 +3146,7 @@ test_expect_failure '10e-check: Does git complain about untracked file that is n
 		echo random >z/c &&
 
 		git merge -s recursive B^0 >out 2>err &&
-	! test_i18ngrep "following untracked working tree files would be overwritten by merge" err &&
+		test_i18ngrep ! "following untracked working tree files would be overwritten by merge" err &&
 
 		test 3 -eq $(git ls-files -s | wc -l) &&
 		test 0 -eq $(git ls-files -u | wc -l) &&



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux