{"thread":{"id":"6964","subject":"[PATCH 7/8] convert users of \"cmp -s\" to \"git diff\"","startedAt":"2007-02-25T22:37:14Z","lastAt":"2007-02-25T22:37:14Z","messageCount":1,"participants":["Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":8},"messages":[{"id":"35471","messageId":"Pine.LNX.4.63.0702252337010.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"6964","inReplyTo":null,"subject":"[PATCH 7/8] convert users of \"cmp -s\" to \"git diff\"","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-02-25T22:37:14Z","receivedAt":"2007-02-25T22:37:14Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nThis is really just\n\n$ perl -pi.bak -e \"s/(^\\s*|'|&&\\s*)cmp -s /\\1git diff /\" *.sh\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n\n\tWe should probably add a \"--quiet\" flag for the diff family\n\tfirst, and use that...\n\n t/t0000-basic.sh      |    4 ++--\n t/t4002-diff-basic.sh |   26 +++++++++++++-------------\n 2 files changed, 15 insertions(+), 15 deletions(-)\n\ndiff --git a/t/t0000-basic.sh b/t/t0000-basic.sh\nindex 186de70..743ee03 100755\n--- a/t/t0000-basic.sh\n+++ b/t/t0000-basic.sh\n@@ -37,7 +37,7 @@ fi\n find .git/objects -type f -print >should-be-empty\n test_expect_success \\\n     '.git/objects should be empty after git-init in an empty repo.' \\\n-    'cmp -s /dev/null should-be-empty' \n+    'git diff /dev/null should-be-empty' \n \n # also it should have 2 subdirectories; no fan-out anymore, pack, and info.\n # 3 is counting \"objects\" itself\n@@ -242,7 +242,7 @@ test_expect_success \\\n \n test_expect_success \\\n     'no diff after checkout and git-update-index --refresh.' \\\n-    'git-diff-files >current && cmp -s current /dev/null'\n+    'git-diff-files >current && git diff current /dev/null'\n \n ################################################################\n P=087704a96baf1c2d1c869a8b084481e121c88b5b\ndiff --git a/t/t4002-diff-basic.sh b/t/t4002-diff-basic.sh\nindex 56eda63..50e9922 100755\n--- a/t/t4002-diff-basic.sh\n+++ b/t/t4002-diff-basic.sh\n@@ -141,50 +141,50 @@ cmp_diff_files_output () {\n test_expect_success \\\n     'diff-tree of known trees.' \\\n     'git-diff-tree $tree_O $tree_A >.test-a &&\n-     cmp -s .test-a .test-plain-OA'\n+     git diff .test-a .test-plain-OA'\n \n test_expect_success \\\n     'diff-tree of known trees.' \\\n     'git-diff-tree -r $tree_O $tree_A >.test-a &&\n-     cmp -s .test-a .test-recursive-OA'\n+     git diff .test-a .test-recursive-OA'\n \n test_expect_success \\\n     'diff-tree of known trees.' \\\n     'git-diff-tree $tree_O $tree_B >.test-a &&\n-     cmp -s .test-a .test-plain-OB'\n+     git diff .test-a .test-plain-OB'\n \n test_expect_success \\\n     'diff-tree of known trees.' \\\n     'git-diff-tree -r $tree_O $tree_B >.test-a &&\n-     cmp -s .test-a .test-recursive-OB'\n+     git diff .test-a .test-recursive-OB'\n \n test_expect_success \\\n     'diff-tree of known trees.' \\\n     'git-diff-tree $tree_A $tree_B >.test-a &&\n-     cmp -s .test-a .test-plain-AB'\n+     git diff .test-a .test-plain-AB'\n \n test_expect_success \\\n     'diff-tree of known trees.' \\\n     'git-diff-tree -r $tree_A $tree_B >.test-a &&\n-     cmp -s .test-a .test-recursive-AB'\n+     git diff .test-a .test-recursive-AB'\n \n test_expect_success \\\n     'diff-cache O with A in cache' \\\n     'git-read-tree $tree_A &&\n      git-diff-index --cached $tree_O >.test-a &&\n-     cmp -s .test-a .test-recursive-OA'\n+     git diff .test-a .test-recursive-OA'\n \n test_expect_success \\\n     'diff-cache O with B in cache' \\\n     'git-read-tree $tree_B &&\n      git-diff-index --cached $tree_O >.test-a &&\n-     cmp -s .test-a .test-recursive-OB'\n+     git diff .test-a .test-recursive-OB'\n \n test_expect_success \\\n     'diff-cache A with B in cache' \\\n     'git-read-tree $tree_B &&\n      git-diff-index --cached $tree_A >.test-a &&\n-     cmp -s .test-a .test-recursive-AB'\n+     git diff .test-a .test-recursive-AB'\n \n test_expect_success \\\n     'diff-files with O in cache and A checked out' \\\n@@ -224,24 +224,24 @@ test_expect_success \\\n     'diff-tree O A == diff-tree -R A O' \\\n     'git-diff-tree $tree_O $tree_A >.test-a &&\n     git-diff-tree -R $tree_A $tree_O >.test-b &&\n-    cmp -s .test-a .test-b'\n+    git diff .test-a .test-b'\n \n test_expect_success \\\n     'diff-tree -r O A == diff-tree -r -R A O' \\\n     'git-diff-tree -r $tree_O $tree_A >.test-a &&\n     git-diff-tree -r -R $tree_A $tree_O >.test-b &&\n-    cmp -s .test-a .test-b'\n+    git diff .test-a .test-b'\n \n test_expect_success \\\n     'diff-tree B A == diff-tree -R A B' \\\n     'git-diff-tree $tree_B $tree_A >.test-a &&\n     git-diff-tree -R $tree_A $tree_B >.test-b &&\n-    cmp -s .test-a .test-b'\n+    git diff .test-a .test-b'\n \n test_expect_success \\\n     'diff-tree -r B A == diff-tree -r -R A B' \\\n     'git-diff-tree -r $tree_B $tree_A >.test-a &&\n     git-diff-tree -r -R $tree_A $tree_B >.test-b &&\n-    cmp -s .test-a .test-b'\n+    git diff .test-a .test-b'\n \n test_done\n-- \n1.5.0.1.788.g8ca52\n"}]}