{"thread":{"id":"6963","subject":"[PATCH 8/8] convert remaining users of \"cmp\" to \"git diff\"","startedAt":"2007-02-25T22:38:07Z","lastAt":"2007-02-25T22:38:07Z","messageCount":1,"participants":["Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":8},"messages":[{"id":"35469","messageId":"Pine.LNX.4.63.0702252337210.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"6963","inReplyTo":null,"subject":"[PATCH 8/8] convert remaining users of \"cmp\" to \"git diff\"","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-02-25T22:38:07Z","receivedAt":"2007-02-25T22:38:07Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nThis is really\n\n$ perl -pi.bak -e \\\n  \"s/(^\\s*|'|\\\"|^\\s*if |&&\\s*)cmp /\\1git diff /\" t/*.sh\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n\n\tBTW all tests pass with this series...\n\n t/t1002-read-tree-m-u-2way.sh    |   32 +++++++++++++-------------\n t/t1003-read-tree-prefix.sh      |    2 +-\n t/t1020-subdirectory.sh          |   16 ++++++------\n t/t1200-tutorial.sh              |   22 +++++++++---------\n t/t1300-repo-config.sh           |   46 +++++++++++++++++++-------------------\n t/t2101-update-index-reupdate.sh |   12 +++++-----\n t/t3300-funny-names.sh           |    2 +-\n t/t4012-diff-binary.sh           |    4 +-\n t/t4109-apply-multifrag.sh       |    6 ++--\n t/t4110-apply-scan.sh            |    2 +-\n t/t5300-pack-object.sh           |   12 +++++-----\n t/t5400-send-pack.sh             |    4 +-\n t/t6021-merge-criss-cross.sh     |    2 +-\n t/t9101-git-svn-props.sh         |    4 +-\n t/t9105-git-svn-commit-diff.sh   |    4 +-\n t/t9107-git-svn-migrate.sh       |    2 +-\n t/t9108-git-svn-glob.sh          |    4 +-\n 17 files changed, 88 insertions(+), 88 deletions(-)\n\ndiff --git a/t/t1002-read-tree-m-u-2way.sh b/t/t1002-read-tree-m-u-2way.sh\nindex 87fe993..2a70ee9 100755\n--- a/t/t1002-read-tree-m-u-2way.sh\n+++ b/t/t1002-read-tree-m-u-2way.sh\n@@ -59,9 +59,9 @@ test_expect_success \\\n      git-read-tree --reset -u $treeH &&\n      git-read-tree -m -u $treeH $treeM &&\n      git-ls-files --stage >1-3.out &&\n-     cmp M.out 1-3.out &&\n+     git diff M.out 1-3.out &&\n      sum bozbar frotz nitfol >actual3.sum &&\n-     cmp M.sum actual3.sum &&\n+     git diff M.sum actual3.sum &&\n      check_cache_at bozbar clean &&\n      check_cache_at frotz clean &&\n      check_cache_at nitfol clean'\n@@ -79,7 +79,7 @@ test_expect_success \\\n      compare_change 4diff.out expected &&\n      check_cache_at yomin clean &&\n      sum bozbar frotz nitfol >actual4.sum &&\n-     cmp M.sum actual4.sum &&\n+     git diff M.sum actual4.sum &&\n      echo yomin >yomin1 &&\n      diff yomin yomin1 &&\n      rm -f yomin1'\n@@ -98,7 +98,7 @@ test_expect_success \\\n      compare_change 5diff.out expected &&\n      check_cache_at yomin dirty &&\n      sum bozbar frotz nitfol >actual5.sum &&\n-     cmp M.sum actual5.sum &&\n+     git diff M.sum actual5.sum &&\n      : dirty index should have prevented -u from checking it out. &&\n      echo yomin yomin >yomin1 &&\n      diff yomin yomin1 &&\n@@ -115,7 +115,7 @@ test_expect_success \\\n      diff -U0 M.out 6.out &&\n      check_cache_at frotz clean &&\n      sum bozbar frotz nitfol >actual3.sum &&\n-     cmp M.sum actual3.sum &&\n+     git diff M.sum actual3.sum &&\n      echo frotz >frotz1 &&\n      diff frotz frotz1 &&\n      rm -f frotz1'\n@@ -132,7 +132,7 @@ test_expect_success \\\n      diff -U0 M.out 7.out &&\n      check_cache_at frotz dirty &&\n      sum bozbar frotz nitfol >actual7.sum &&\n-     if cmp M.sum actual7.sum; then false; else :; fi &&\n+     if git diff M.sum actual7.sum; then false; else :; fi &&\n      : dirty index should have prevented -u from checking it out. &&\n      echo frotz frotz >frotz1 &&\n      diff frotz frotz1 &&\n@@ -163,9 +163,9 @@ test_expect_success \\\n      git-update-index --add rezrov &&\n      git-read-tree -m -u $treeH $treeM &&\n      git-ls-files --stage >10.out &&\n-     cmp M.out 10.out &&\n+     git diff M.out 10.out &&\n      sum bozbar frotz nitfol >actual10.sum &&\n-     cmp M.sum actual10.sum'\n+     git diff M.sum actual10.sum'\n \n test_expect_success \\\n     '11 - dirty path removed.' \\\n@@ -210,9 +210,9 @@ test_expect_success \\\n      compare_change 14diff.out expected &&\n      sum bozbar frotz >actual14.sum &&\n      grep -v nitfol M.sum > expected14.sum &&\n-     cmp expected14.sum actual14.sum &&\n+     git diff expected14.sum actual14.sum &&\n      sum bozbar frotz nitfol >actual14a.sum &&\n-     if cmp M.sum actual14a.sum; then false; else :; fi &&\n+     if git diff M.sum actual14a.sum; then false; else :; fi &&\n      check_cache_at nitfol clean &&\n      echo nitfol nitfol >nitfol1 &&\n      diff nitfol nitfol1 &&\n@@ -232,9 +232,9 @@ test_expect_success \\\n      check_cache_at nitfol dirty &&\n      sum bozbar frotz >actual15.sum &&\n      grep -v nitfol M.sum > expected15.sum &&\n-     cmp expected15.sum actual15.sum &&\n+     git diff expected15.sum actual15.sum &&\n      sum bozbar frotz nitfol >actual15a.sum &&\n-     if cmp M.sum actual15a.sum; then false; else :; fi &&\n+     if git diff M.sum actual15a.sum; then false; else :; fi &&\n      echo nitfol nitfol nitfol >nitfol1 &&\n      diff nitfol nitfol1 &&\n      rm -f nitfol1'\n@@ -267,7 +267,7 @@ test_expect_success \\\n      diff -U0 M.out 18.out &&\n      check_cache_at bozbar clean &&\n      sum bozbar frotz nitfol >actual18.sum &&\n-     cmp M.sum actual18.sum'\n+     git diff M.sum actual18.sum'\n \n test_expect_success \\\n     '19 - local change already having a good result, further modified.' \\\n@@ -282,9 +282,9 @@ test_expect_success \\\n      check_cache_at bozbar dirty &&\n      sum frotz nitfol >actual19.sum &&\n      grep -v bozbar  M.sum > expected19.sum &&\n-     cmp expected19.sum actual19.sum &&\n+     git diff expected19.sum actual19.sum &&\n      sum bozbar frotz nitfol >actual19a.sum &&\n-     if cmp M.sum actual19a.sum; then false; else :; fi &&\n+     if git diff M.sum actual19a.sum; then false; else :; fi &&\n      echo gnusto gnusto >bozbar1 &&\n      diff bozbar bozbar1 &&\n      rm -f bozbar1'\n@@ -300,7 +300,7 @@ test_expect_success \\\n      diff -U0 M.out 20.out &&\n      check_cache_at bozbar clean &&\n      sum bozbar frotz nitfol >actual20.sum &&\n-     cmp M.sum actual20.sum'\n+     git diff M.sum actual20.sum'\n \n test_expect_success \\\n     '21 - no local change, dirty cache.' \\\ndiff --git a/t/t1003-read-tree-prefix.sh b/t/t1003-read-tree-prefix.sh\nindex 48ab117..4029f57 100755\n--- a/t/t1003-read-tree-prefix.sh\n+++ b/t/t1003-read-tree-prefix.sh\n@@ -21,7 +21,7 @@ two/one' >expect\n test_expect_success 'read-tree --prefix' '\n \tgit-read-tree --prefix=two/ $tree &&\n \tgit-ls-files >actual &&\n-\tcmp expect actual\n+\tgit diff expect actual\n '\n \n test_done\ndiff --git a/t/t1020-subdirectory.sh b/t/t1020-subdirectory.sh\nindex 1e8f9e5..22588bb 100755\n--- a/t/t1020-subdirectory.sh\n+++ b/t/t1020-subdirectory.sh\n@@ -46,10 +46,10 @@ test_expect_success 'cat-file' '\n \ttwo=`expr \"$two\" : \"[0-7]* \\\\([0-9a-f]*\\\\)\"` &&\n \techo \"$two\" &&\n \tgit-cat-file -p \"$two\" >actual &&\n-\tcmp dir/two actual &&\n+\tgit diff dir/two actual &&\n \tcd dir &&\n \tgit-cat-file -p \"$two\" >actual &&\n-\tcmp two actual\n+\tgit diff two actual\n '\n rm -f actual dir/actual\n \n@@ -86,10 +86,10 @@ test_expect_success 'write-tree' '\n test_expect_success 'checkout-index' '\n \tcd $HERE &&\n \tgit-checkout-index -f -u one &&\n-\tcmp one original.one &&\n+\tgit diff one original.one &&\n \tcd dir &&\n \tgit-checkout-index -f -u two &&\n-\tcmp two ../original.two\n+\tgit diff two ../original.two\n '\n \n test_expect_success 'read-tree' '\n@@ -97,13 +97,13 @@ test_expect_success 'read-tree' '\n \trm -f one dir/two &&\n \ttree=`git-write-tree` &&\n \tgit-read-tree --reset -u \"$tree\" &&\n-\tcmp one original.one &&\n-\tcmp dir/two original.two &&\n+\tgit diff one original.one &&\n+\tgit diff dir/two original.two &&\n \tcd dir &&\n \trm -f two &&\n \tgit-read-tree --reset -u \"$tree\" &&\n-\tcmp two ../original.two &&\n-\tcmp ../one ../original.one\n+\tgit diff two ../original.two &&\n+\tgit diff ../one ../original.one\n '\n \n test_expect_success 'no file/rev ambiguity check inside .git' '\ndiff --git a/t/t1200-tutorial.sh b/t/t1200-tutorial.sh\nindex ca2c30f..a3c2650 100755\n--- a/t/t1200-tutorial.sh\n+++ b/t/t1200-tutorial.sh\n@@ -27,9 +27,9 @@ index 557db03..263414f 100644\n +It's a new day for git\n EOF\n git-diff-files -p > diff.output\n-test_expect_success 'git-diff-files -p' 'cmp diff.expect diff.output'\n+test_expect_success 'git-diff-files -p' 'git diff diff.expect diff.output'\n git diff > diff.output\n-test_expect_success 'git diff' 'cmp diff.expect diff.output'\n+test_expect_success 'git diff' 'git diff diff.expect diff.output'\n \n tree=$(git-write-tree 2>/dev/null)\n \n@@ -38,10 +38,10 @@ test_expect_success 'tree' \"test 8988da15d077d4829fc51d8544c097def6644dbb = $tre\n output=\"$(echo \"Initial commit\" | git-commit-tree $(git-write-tree) 2>&1 > .git/refs/heads/master)\"\n \n git-diff-index -p HEAD > diff.output\n-test_expect_success 'git-diff-index -p HEAD' 'cmp diff.expect diff.output'\n+test_expect_success 'git-diff-index -p HEAD' 'git diff diff.expect diff.output'\n \n git diff HEAD > diff.output\n-test_expect_success 'git diff HEAD' 'cmp diff.expect diff.output'\n+test_expect_success 'git diff HEAD' 'git diff diff.expect diff.output'\n \n #rm hello\n #test_expect_success 'git-read-tree --reset HEAD' \"git-read-tree --reset HEAD ; test \\\"hello: needs update\\\" = \\\"$(git-update-index --refresh)\\\"\"\n@@ -73,15 +73,15 @@ git-whatchanged -p --root | \\\n \tsed -e \"1s/^\\(.\\{7\\}\\).\\{40\\}/\\1VARIABLE/\" \\\n \t\t-e \"2,3s/^\\(.\\{8\\}\\).*$/\\1VARIABLE/\" \\\n > whatchanged.output\n-test_expect_success 'git-whatchanged -p --root' 'cmp whatchanged.expect whatchanged.output'\n+test_expect_success 'git-whatchanged -p --root' 'git diff whatchanged.expect whatchanged.output'\n \n git tag my-first-tag\n-test_expect_success 'git tag my-first-tag' 'cmp .git/refs/heads/master .git/refs/tags/my-first-tag'\n+test_expect_success 'git tag my-first-tag' 'git diff .git/refs/heads/master .git/refs/tags/my-first-tag'\n \n # TODO: test git-clone\n \n git checkout -b mybranch\n-test_expect_success 'git checkout -b mybranch' 'cmp .git/refs/heads/master .git/refs/heads/mybranch'\n+test_expect_success 'git checkout -b mybranch' 'git diff .git/refs/heads/master .git/refs/heads/mybranch'\n \n cat > branch.expect <<EOF\n   master\n@@ -89,7 +89,7 @@ cat > branch.expect <<EOF\n EOF\n \n git branch > branch.output\n-test_expect_success 'git branch' 'cmp branch.expect branch.output'\n+test_expect_success 'git branch' 'git diff branch.expect branch.output'\n \n git checkout mybranch\n echo \"Work, work, work\" >>hello\n@@ -125,7 +125,7 @@ cat > show-branch.expect << EOF\n EOF\n \n git show-branch --topo-order master mybranch > show-branch.output\n-test_expect_success 'git show-branch' 'cmp show-branch.expect show-branch.output'\n+test_expect_success 'git show-branch' 'git diff show-branch.expect show-branch.output'\n \n git checkout mybranch\n \n@@ -138,7 +138,7 @@ EOF\n \n git merge -s \"Merge upstream changes.\" master | \\\n \tsed -e \"1s/[0-9a-f]\\{40\\}/VARIABLE/g\" >resolve.output\n-test_expect_success 'git resolve' 'cmp resolve.expect resolve.output'\n+test_expect_success 'git resolve' 'git diff resolve.expect resolve.output'\n \n cat > show-branch2.expect << EOF\n ! [master] Merged \"mybranch\" changes.\n@@ -148,7 +148,7 @@ cat > show-branch2.expect << EOF\n EOF\n \n git show-branch --topo-order master mybranch > show-branch2.output\n-test_expect_success 'git show-branch' 'cmp show-branch2.expect show-branch2.output'\n+test_expect_success 'git show-branch' 'git diff show-branch2.expect show-branch2.output'\n \n # TODO: test git fetch\n \ndiff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh\nindex 84a5939..3753e9f 100755\n--- a/t/t1300-repo-config.sh\n+++ b/t/t1300-repo-config.sh\n@@ -16,7 +16,7 @@ cat > expect << EOF\n \tpenguin = little blue\n EOF\n \n-test_expect_success 'initial' 'cmp .git/config expect'\n+test_expect_success 'initial' 'git diff .git/config expect'\n \n git-config Core.Movie BadPhysics\n \n@@ -26,7 +26,7 @@ cat > expect << EOF\n \tMovie = BadPhysics\n EOF\n \n-test_expect_success 'mixed case' 'cmp .git/config expect'\n+test_expect_success 'mixed case' 'git diff .git/config expect'\n \n git-config Cores.WhatEver Second\n \n@@ -38,7 +38,7 @@ cat > expect << EOF\n \tWhatEver = Second\n EOF\n \n-test_expect_success 'similar section' 'cmp .git/config expect'\n+test_expect_success 'similar section' 'git diff .git/config expect'\n \n git-config CORE.UPPERCASE true\n \n@@ -51,7 +51,7 @@ cat > expect << EOF\n \tWhatEver = Second\n EOF\n \n-test_expect_success 'similar section' 'cmp .git/config expect'\n+test_expect_success 'similar section' 'git diff .git/config expect'\n \n test_expect_success 'replace with non-match' \\\n \t'git-config core.penguin kingpin !blue'\n@@ -69,7 +69,7 @@ cat > expect << EOF\n \tWhatEver = Second\n EOF\n \n-test_expect_success 'non-match result' 'cmp .git/config expect'\n+test_expect_success 'non-match result' 'git diff .git/config expect'\n \n cat > .git/config << EOF\n [beta] ; silly comment # another comment\n@@ -97,7 +97,7 @@ noIndent= sillyValue ; 'nother silly comment\n [nextSection] noNewline = ouch\n EOF\n \n-test_expect_success 'multiple unset is correct' 'cmp .git/config expect'\n+test_expect_success 'multiple unset is correct' 'git diff .git/config expect'\n \n mv .git/config2 .git/config\n \n@@ -114,7 +114,7 @@ noIndent= sillyValue ; 'nother silly comment\n [nextSection] noNewline = ouch\n EOF\n \n-test_expect_success 'all replaced' 'cmp .git/config expect'\n+test_expect_success 'all replaced' 'git diff .git/config expect'\n \n git-config beta.haha alpha\n \n@@ -128,7 +128,7 @@ noIndent= sillyValue ; 'nother silly comment\n [nextSection] noNewline = ouch\n EOF\n \n-test_expect_success 'really mean test' 'cmp .git/config expect'\n+test_expect_success 'really mean test' 'git diff .git/config expect'\n \n git-config nextsection.nonewline wow\n \n@@ -143,7 +143,7 @@ noIndent= sillyValue ; 'nother silly comment\n \tnonewline = wow\n EOF\n \n-test_expect_success 'really really mean test' 'cmp .git/config expect'\n+test_expect_success 'really really mean test' 'git diff .git/config expect'\n \n test_expect_success 'get value' 'test alpha = $(git-config beta.haha)'\n git-config --unset beta.haha\n@@ -158,7 +158,7 @@ noIndent= sillyValue ; 'nother silly comment\n \tnonewline = wow\n EOF\n \n-test_expect_success 'unset' 'cmp .git/config expect'\n+test_expect_success 'unset' 'git diff .git/config expect'\n \n git-config nextsection.NoNewLine \"wow2 for me\" \"for me$\"\n \n@@ -173,7 +173,7 @@ noIndent= sillyValue ; 'nother silly comment\n \tNoNewLine = wow2 for me\n EOF\n \n-test_expect_success 'multivar' 'cmp .git/config expect'\n+test_expect_success 'multivar' 'git diff .git/config expect'\n \n test_expect_success 'non-match' \\\n \t'git-config --get nextsection.nonewline !for'\n@@ -200,7 +200,7 @@ noIndent= sillyValue ; 'nother silly comment\n \tNoNewLine = wow2 for me\n EOF\n \n-test_expect_success 'multivar replace' 'cmp .git/config expect'\n+test_expect_success 'multivar replace' 'git diff .git/config expect'\n \n test_expect_failure 'ambiguous value' 'git-config nextsection.nonewline'\n \n@@ -222,7 +222,7 @@ noIndent= sillyValue ; 'nother silly comment\n \tNoNewLine = wow2 for me\n EOF\n \n-test_expect_success 'multivar unset' 'cmp .git/config expect'\n+test_expect_success 'multivar unset' 'git diff .git/config expect'\n \n test_expect_failure 'invalid key' 'git-config inval.2key blabla'\n \n@@ -245,7 +245,7 @@ noIndent= sillyValue ; 'nother silly comment\n \tAlpha = beta\n EOF\n \n-test_expect_success 'hierarchical section value' 'cmp .git/config expect'\n+test_expect_success 'hierarchical section value' 'git diff .git/config expect'\n \n cat > expect << EOF\n beta.noindent=sillyValue\n@@ -255,7 +255,7 @@ version.1.2.3eX.alpha=beta\n EOF\n \n test_expect_success 'working --list' \\\n-\t'git-config --list > output && cmp output expect'\n+\t'git-config --list > output && git diff output expect'\n \n cat > expect << EOF\n beta.noindent sillyValue\n@@ -263,7 +263,7 @@ nextsection.nonewline wow2 for me\n EOF\n \n test_expect_success '--get-regexp' \\\n-\t'git-config --get-regexp in > output && cmp output expect'\n+\t'git-config --get-regexp in > output && git diff output expect'\n \n git-config --add nextsection.nonewline \"wow4 for you\"\n \n@@ -273,7 +273,7 @@ wow4 for you\n EOF\n \n test_expect_success '--add' \\\n-\t'git-config --get-all nextsection.nonewline > output && cmp output expect'\n+\t'git-config --get-all nextsection.nonewline > output && git diff output expect'\n \n cat > .git/config << EOF\n [novalue]\n@@ -302,7 +302,7 @@ cat > expect << EOF\n \tx = y\n EOF\n \n-test_expect_success 'new section is partial match of another' 'cmp .git/config expect'\n+test_expect_success 'new section is partial match of another' 'git diff .git/config expect'\n \n git-config b.x y\n git-config a.b c\n@@ -317,7 +317,7 @@ cat > expect << EOF\n \tx = y\n EOF\n \n-test_expect_success 'new variable inserts into proper section' 'cmp .git/config expect'\n+test_expect_success 'new variable inserts into proper section' 'git diff .git/config expect'\n \n cat > other-config << EOF\n [ein]\n@@ -330,7 +330,7 @@ EOF\n \n GIT_CONFIG=other-config git-config -l > output\n \n-test_expect_success 'alternative GIT_CONFIG' 'cmp output expect'\n+test_expect_success 'alternative GIT_CONFIG' 'git diff output expect'\n \n GIT_CONFIG=other-config git-config anwohner.park ausweis\n \n@@ -341,7 +341,7 @@ cat > expect << EOF\n \tpark = ausweis\n EOF\n \n-test_expect_success '--set in alternative GIT_CONFIG' 'cmp other-config expect'\n+test_expect_success '--set in alternative GIT_CONFIG' 'git diff other-config expect'\n \n cat > .git/config << EOF\n # Hallo\n@@ -416,7 +416,7 @@ cat > expect << EOF\n \thash = \"test#test\"\n EOF\n \n-test_expect_success 'quoting' 'cmp .git/config expect'\n+test_expect_success 'quoting' 'git diff .git/config expect'\n \n test_expect_failure 'key with newline' 'git config key.with\\\\\\\n newline 123'\n@@ -442,7 +442,7 @@ EOF\n \n git config --list > result\n \n-test_expect_success 'value continued on next line' 'cmp result expect'\n+test_expect_success 'value continued on next line' 'git diff result expect'\n \n test_done\n \ndiff --git a/t/t2101-update-index-reupdate.sh b/t/t2101-update-index-reupdate.sh\nindex a78ea7f..723a682 100755\n--- a/t/t2101-update-index-reupdate.sh\n+++ b/t/t2101-update-index-reupdate.sh\n@@ -17,7 +17,7 @@ test_expect_success 'update-index --add' \\\n \t echo goodbye people >file2 &&\n \t git-update-index --add file1 file2 &&\n \t git-ls-files -s >current &&\n-\t cmp current expected'\n+\t git diff current expected'\n \n test_expect_success 'update-index --again' \\\n \t'rm -f file1 &&\n@@ -30,7 +30,7 @@ test_expect_success 'update-index --again' \\\n \t\techo happy - failed as expected\n \tfi &&\n \t git-ls-files -s >current &&\n-\t cmp current expected'\n+\t git diff current expected'\n \n cat > expected <<\\EOF\n 100644 0f1ae1422c2bf43f117d3dbd715c988a9ed2103f 0\tfile2\n@@ -38,7 +38,7 @@ EOF\n test_expect_success 'update-index --remove --again' \\\n \t'git-update-index --remove --again &&\n \t git-ls-files -s >current &&\n-\t cmp current expected'\n+\t git diff current expected'\n \n test_expect_success 'first commit' 'git-commit -m initial'\n \n@@ -55,7 +55,7 @@ test_expect_success 'update-index again' \\\n \techo happy >dir1/file3 &&\n \tgit-update-index --again &&\n \tgit-ls-files -s >current &&\n-\tcmp current expected'\n+\tgit diff current expected'\n \n cat > expected <<\\EOF\n 100644 d7fb3f695f06c759dbf3ab00046e7cc2da22d10f 0\tdir1/file3\n@@ -68,7 +68,7 @@ test_expect_success 'update-index --update from subdir' \\\n \tgit-update-index --again &&\n \tcd .. &&\n \tgit-ls-files -s >current &&\n-\tcmp current expected'\n+\tgit diff current expected'\n \n cat > expected <<\\EOF\n 100644 594fb5bb1759d90998e2bf2a38261ae8e243c760 0\tdir1/file3\n@@ -79,6 +79,6 @@ test_expect_success 'update-index --update with pathspec' \\\n \tcat file2 >dir1/file3 &&\n \tgit-update-index --again dir1/ &&\n \tgit-ls-files -s >current &&\n-\tcmp current expected'\n+\tgit diff current expected'\n \n test_done\ndiff --git a/t/t3300-funny-names.sh b/t/t3300-funny-names.sh\nindex b5a1400..5913152 100755\n--- a/t/t3300-funny-names.sh\n+++ b/t/t3300-funny-names.sh\n@@ -24,7 +24,7 @@ EOF\n cat >\"$p1\" \"$p0\"\n echo 'Foo Bar Baz' >\"$p2\"\n \n-test -f \"$p1\" && cmp \"$p0\" \"$p1\" || {\n+test -f \"$p1\" && git diff \"$p0\" \"$p1\" || {\n \t# since FAT/NTFS does not allow tabs in filenames, skip this test\n \tsay 'Your filesystem does not allow tabs in filenames, test skipped.'\n \ttest_done\ndiff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh\nindex 323606c..c5f530f 100755\n--- a/t/t4012-diff-binary.sh\n+++ b/t/t4012-diff-binary.sh\n@@ -25,11 +25,11 @@ cat > expected <<\\EOF\n EOF\n test_expect_success 'diff without --binary' \\\n \t'git-diff | git-apply --stat --summary >current &&\n-\t cmp current expected'\n+\t git diff current expected'\n \n test_expect_success 'diff with --binary' \\\n \t'git-diff --binary | git-apply --stat --summary >current &&\n-\t cmp current expected'\n+\t git diff current expected'\n \n # apply needs to be able to skip the binary material correctly\n # in order to report the line number of a corrupt patch.\ndiff --git a/t/t4109-apply-multifrag.sh b/t/t4109-apply-multifrag.sh\nindex 5988e1a..180febc 100755\n--- a/t/t4109-apply-multifrag.sh\n+++ b/t/t4109-apply-multifrag.sh\n@@ -146,7 +146,7 @@ test_expect_success \"S = patch (1)\" \\\n     'cat patch1.patch patch2.patch | patch -p1'\n \n test_expect_success \"S = cmp (1)\" \\\n-    'cmp main.c.git main.c'\n+    'git diff main.c.git main.c'\n \n rm -f main.c main.c.git\n \n@@ -158,7 +158,7 @@ test_expect_success \"S = patch (2)\" \\\n     'cat patch1.patch patch2.patch patch3.patch | patch -p1'\n \n test_expect_success \"S = cmp (2)\" \\\n-    'cmp main.c.git main.c'\n+    'git diff main.c.git main.c'\n \n rm -f main.c main.c.git\n \n@@ -170,7 +170,7 @@ test_expect_success \"S = patch (3)\" \\\n     'cat patch1.patch patch4.patch | patch -p1'\n \n test_expect_success \"S = cmp (3)\" \\\n-    'cmp main.c.git main.c'\n+    'git diff main.c.git main.c'\n \n test_done\n \ndiff --git a/t/t4110-apply-scan.sh b/t/t4110-apply-scan.sh\nindex 005f744..ec00ed6 100755\n--- a/t/t4110-apply-scan.sh\n+++ b/t/t4110-apply-scan.sh\n@@ -95,7 +95,7 @@ test_expect_success \"S = patch scan\" \\\n mv new.txt patch.txt\n \n test_expect_success \"S = cmp\" \\\n-    'cmp apply.txt patch.txt'\n+    'git diff apply.txt patch.txt'\n \n test_done\n \ndiff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh\nindex f511547..522d7b2 100755\n--- a/t/t5300-pack-object.sh\n+++ b/t/t5300-pack-object.sh\n@@ -56,7 +56,7 @@ test_expect_success \\\n     '(cd ../.git && find objects -type f -print) |\n      while read path\n      do\n-         cmp $path ../.git/$path || {\n+         git diff $path ../.git/$path || {\n \t     echo $path differs.\n \t     return 1\n \t }\n@@ -86,7 +86,7 @@ test_expect_success \\\n     '(cd ../.git && find objects -type f -print) |\n      while read path\n      do\n-         cmp $path ../.git/$path || {\n+         git diff $path ../.git/$path || {\n \t     echo $path differs.\n \t     return 1\n \t }\n@@ -182,17 +182,17 @@ test_expect_success \\\n     'build pack index for an existing pack' \\\n     'cp test-1-${packname_1}.pack test-3.pack &&\n      git-index-pack -o tmp.idx test-3.pack &&\n-     cmp tmp.idx test-1-${packname_1}.idx &&\n+     git diff tmp.idx test-1-${packname_1}.idx &&\n \n      git-index-pack test-3.pack &&\n-     cmp test-3.idx test-1-${packname_1}.idx &&\n+     git diff test-3.idx test-1-${packname_1}.idx &&\n \n      cp test-2-${packname_2}.pack test-3.pack &&\n      git-index-pack -o tmp.idx test-2-${packname_2}.pack &&\n-     cmp tmp.idx test-2-${packname_2}.idx &&\n+     git diff tmp.idx test-2-${packname_2}.idx &&\n \n      git-index-pack test-3.pack &&\n-     cmp test-3.idx test-2-${packname_2}.idx &&\n+     git diff test-3.idx test-2-${packname_2}.idx &&\n \n      :'\n \ndiff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh\nindex fc4a126..03c2692 100755\n--- a/t/t5400-send-pack.sh\n+++ b/t/t5400-send-pack.sh\n@@ -77,7 +77,7 @@ test_expect_success \\\n \t\techo >&2 Thanks, it correctly failed.\n \t\ttrue\n \tfi &&\n-\tif cmp victim/.git/refs/heads/master .git/refs/heads/master\n+\tif git diff victim/.git/refs/heads/master .git/refs/heads/master\n \tthen\n \t\t# should have been left as it was!\n \t\tfalse\n@@ -86,7 +86,7 @@ test_expect_success \\\n \tfi &&\n \t# this should update\n \tgit-send-pack --force ./victim/.git/ master &&\n-\tcmp victim/.git/refs/heads/master .git/refs/heads/master\n+\tgit diff victim/.git/refs/heads/master .git/refs/heads/master\n '\n \n test_expect_success \\\ndiff --git a/t/t6021-merge-criss-cross.sh b/t/t6021-merge-criss-cross.sh\nindex 499cafb..c9d43dd 100755\n--- a/t/t6021-merge-criss-cross.sh\n+++ b/t/t6021-merge-criss-cross.sh\n@@ -87,6 +87,6 @@ cat > file-expect <<EOF\n 9\n EOF\n \n-test_expect_success 'Criss-cross merge result' 'cmp file file-expect'\n+test_expect_success 'Criss-cross merge result' 'git diff file file-expect'\n \n test_done\ndiff --git a/t/t9101-git-svn-props.sh b/t/t9101-git-svn-props.sh\nindex 622ea1c..28738d7 100755\n--- a/t/t9101-git-svn-props.sh\n+++ b/t/t9101-git-svn-props.sh\n@@ -96,7 +96,7 @@ test_expect_success 'fetch and pull latest from svn and checkout a new wc' \\\n \n for i in crlf ne_crlf lf ne_lf cr ne_cr empty_cr empty_lf empty empty_crlf\n do\n-\ttest_expect_success \"Comparing $i\" \"cmp $i new_wc/$i\"\n+\ttest_expect_success \"Comparing $i\" \"git diff $i new_wc/$i\"\n done\n \n \n@@ -144,7 +144,7 @@ test_expect_success 'test show-ignore' \"\n \tsvn commit -m 'propset svn:ignore'\n \tcd .. &&\n \tgit-svn show-ignore > show-ignore.got &&\n-\tcmp show-ignore.expect show-ignore.got\n+\tgit diff show-ignore.expect show-ignore.got\n \t\"\n \n test_done\ndiff --git a/t/t9105-git-svn-commit-diff.sh b/t/t9105-git-svn-commit-diff.sh\nindex c668dd1..082785e 100755\n--- a/t/t9105-git-svn-commit-diff.sh\n+++ b/t/t9105-git-svn-commit-diff.sh\n@@ -28,7 +28,7 @@ test_expect_success 'test the commit-diff command' \"\n \ttest -n '$prev' && test -n '$head' &&\n \tgit-svn commit-diff -r1 '$prev' '$head' '$svnrepo' &&\n \tsvn co $svnrepo wc &&\n-\tcmp readme wc/readme\n+\tgit diff readme wc/readme\n \t\"\n \n test_expect_success 'commit-diff to a sub-directory (with git-svn config)' \"\n@@ -37,7 +37,7 @@ test_expect_success 'commit-diff to a sub-directory (with git-svn config)' \"\n \tgit-svn fetch &&\n \tgit-svn commit-diff -r3 '$prev' '$head' &&\n \tsvn cat $svnrepo/subdir/readme > readme.2 &&\n-\tcmp readme readme.2\n+\tgit diff readme readme.2\n \t\"\n \n test_done\ndiff --git a/t/t9107-git-svn-migrate.sh b/t/t9107-git-svn-migrate.sh\nindex dc2afda..37ae559 100755\n--- a/t/t9107-git-svn-migrate.sh\n+++ b/t/t9107-git-svn-migrate.sh\n@@ -105,7 +105,7 @@ test_expect_success  \".rev_db auto-converted to .rev_db.UUID\" \"\n \tgit-svn fetch -i trunk &&\n \ttest -L $GIT_DIR/svn/trunk/.rev_db &&\n \ttest -f \\$expect &&\n-\tcmp \\$expect $GIT_DIR/svn/trunk/.rev_db\n+\tgit diff \\$expect $GIT_DIR/svn/trunk/.rev_db\n \t\"\n \n test_done\ndiff --git a/t/t9108-git-svn-glob.sh b/t/t9108-git-svn-glob.sh\nindex db4344c..83b94ed 100755\n--- a/t/t9108-git-svn-glob.sh\n+++ b/t/t9108-git-svn-glob.sh\n@@ -48,7 +48,7 @@ test_expect_success 'test refspec globbing' \"\n \tgit-svn multi-fetch &&\n \tgit log --pretty=oneline refs/remotes/tags/end | \\\n \t    sed -e 's/^.\\{41\\}//' > output.end &&\n-\tcmp expect.end output.end &&\n+\tgit diff expect.end output.end &&\n \ttest \\\"\\`git rev-parse refs/remotes/tags/end~1\\`\\\" = \\\n \t\t\\\"\\`git rev-parse refs/remotes/branches/start\\`\\\" &&\n \ttest \\\"\\`git rev-parse refs/remotes/branches/start~2\\`\\\" = \\\n@@ -80,7 +80,7 @@ test_expect_success 'test left-hand-side only globbing' \"\n \t     \\`git rev-parse refs/remotes/two/branches/start\\` &&\n \tgit log --pretty=oneline refs/remotes/two/tags/end | \\\n \t    sed -e 's/^.\\{41\\}//' > output.two &&\n-\tcmp expect.two output.two\n+\tgit diff expect.two output.two\n \t\"\n \n test_done\n-- \n1.5.0.1.788.g8ca52\n"}]}