t7406: simplify by using diff --name-only instead of diff --raw
authorElijah Newren <newren@gmail.com>
Wed, 8 Aug 2018 16:31:04 +0000 (09:31 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 8 Aug 2018 17:52:55 +0000 (10:52 -0700)
We can get rid of some quoted tabs and make a few tests slightly easier
to read and edit by just asking for the names of the files modified,
since that's all these tests were interested in anyway.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7406-submodule-update.sh
index ccdc2f9039ae403c2c120105afdb0f7460510daf..f821b01f150fb022a93c1c4f03ec027cc5e79196 100755 (executable)
@@ -579,9 +579,9 @@ test_expect_success 'submodule update - update=none in .git/config' '
          git checkout master &&
          compare_head
         ) &&
-        git diff --raw | grep "        submodule" &&
+        git diff --name-only | grep ^submodule$ &&
         git submodule update &&
-        git diff --raw | grep "        submodule" &&
+        git diff --name-only | grep ^submodule$ &&
         (cd submodule &&
          compare_head
         ) &&
@@ -597,10 +597,10 @@ test_expect_success 'submodule update - update=none in .git/config but --checkou
          git checkout master &&
          compare_head
         ) &&
-        git diff --raw | grep "        submodule" &&
+        git diff --name-only | grep ^submodule$ &&
         git submodule update --checkout &&
-        git diff --raw >out &&
-        ! grep "       submodule" out &&
+        git diff --name-only >out &&
+        ! grep ^submodule$ out &&
         (cd submodule &&
          test_must_fail compare_head
         ) &&