{"thread":{"id":"6962","subject":"[PATCH 6/8] Get rid of the dependency to GNU diff in the tests","startedAt":"2007-02-25T22:36:53Z","lastAt":"2007-02-25T22:36:53Z","messageCount":1,"participants":["Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":8},"messages":[{"id":"35468","messageId":"Pine.LNX.4.63.0702252336390.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"6962","inReplyTo":null,"subject":"[PATCH 6/8] Get rid of the dependency to GNU diff in the tests","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-02-25T22:36:53Z","receivedAt":"2007-02-25T22:36:53Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nNow that \"git diff\" handles stdin and relative paths outside the\nworking tree correctly, we can convert all instances of \"diff -u\"\nto \"git diff\".\n\nThis commit is really the result of\n\n$ perl -pi.bak -e 's/diff -u/git diff/' $(git grep -l \"diff -u\" t/)\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/diff-lib.sh                      |    6 +++---\n t/t1000-read-tree-m-3way.sh        |    2 +-\n t/t1001-read-tree-m-2way.sh        |   26 +++++++++++++-------------\n t/t1002-read-tree-m-u-2way.sh      |    2 +-\n t/t1300-repo-config.sh             |    6 +++---\n t/t3001-ls-files-others-exclude.sh |    4 ++--\n t/t3002-ls-files-dashpath.sh       |   10 +++++-----\n t/t3100-ls-tree-restrict.sh        |    2 +-\n t/t3101-ls-tree-dirname.sh         |    2 +-\n t/t3300-funny-names.sh             |   30 +++++++++++++++---------------\n t/t3900-i18n-commit.sh             |    2 +-\n t/t4006-diff-mode.sh               |    2 +-\n t/t4013-diff-various.sh            |    2 +-\n t/t4015-diff-whitespace.sh         |   12 ++++++------\n t/t4016-diff-quote.sh              |    4 ++--\n t/t4100-apply-stat.sh              |   14 +++++++-------\n t/t4104-apply-boundary.sh          |    4 ++--\n t/t4115-apply-symlink.sh           |    4 ++--\n t/t4116-apply-reverse.sh           |    2 +-\n t/t4117-apply-reject.sh            |   12 ++++++------\n t/t4118-apply-empty-context.sh     |    6 +++---\n t/t4200-rerere.sh                  |    6 +++---\n t/t5400-send-pack.sh               |    2 +-\n t/t5401-update-hooks.sh            |    4 ++--\n t/t6023-merge-file.sh              |    8 ++++----\n t/t6024-recursive-merge.sh         |    4 ++--\n t/t6200-fmt-merge-msg.sh           |   10 +++++-----\n t/t9100-git-svn-basic.sh           |    6 +++---\n t/t9300-fast-import.sh             |   26 +++++++++++++-------------\n 29 files changed, 110 insertions(+), 110 deletions(-)\n\ndiff --git a/t/diff-lib.sh b/t/diff-lib.sh\nindex 745a1b0..4624fe6 100755\n--- a/t/diff-lib.sh\n+++ b/t/diff-lib.sh\n@@ -11,7 +11,7 @@ compare_diff_raw () {\n \n     sed -e \"$sanitize_diff_raw\" <\"$1\" >.tmp-1\n     sed -e \"$sanitize_diff_raw\" <\"$2\" >.tmp-2\n-    diff -u .tmp-1 .tmp-2 && rm -f .tmp-1 .tmp-2\n+    git diff .tmp-1 .tmp-2 && rm -f .tmp-1 .tmp-2\n }\n \n sanitize_diff_raw_z='/^:/s/ '\"$_x40\"' '\"$_x40\"' \\([A-Z]\\)[0-9]*$/ X X \\1#/'\n@@ -23,7 +23,7 @@ compare_diff_raw_z () {\n \n     tr '\\0' '\\012' <\"$1\" | sed -e \"$sanitize_diff_raw_z\" >.tmp-1\n     tr '\\0' '\\012' <\"$2\" | sed -e \"$sanitize_diff_raw_z\" >.tmp-2\n-    diff -u .tmp-1 .tmp-2 && rm -f .tmp-1 .tmp-2\n+    git diff .tmp-1 .tmp-2 && rm -f .tmp-1 .tmp-2\n }\n \n compare_diff_patch () {\n@@ -37,5 +37,5 @@ compare_diff_patch () {\n \t/^[dis]*imilarity index [0-9]*%$/d\n \t/^index [0-9a-f]*\\.\\.[0-9a-f]/d\n     ' <\"$2\" >.tmp-2\n-    diff -u .tmp-1 .tmp-2 && rm -f .tmp-1 .tmp-2\n+    git diff .tmp-1 .tmp-2 && rm -f .tmp-1 .tmp-2\n }\ndiff --git a/t/t1000-read-tree-m-3way.sh b/t/t1000-read-tree-m-3way.sh\nindex d0af8c3..e26a36c 100755\n--- a/t/t1000-read-tree-m-3way.sh\n+++ b/t/t1000-read-tree-m-3way.sh\n@@ -131,7 +131,7 @@ _x40=\"$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40\"\n \n check_result () {\n     git-ls-files --stage | sed -e 's/ '\"$_x40\"' / X /' >current &&\n-    diff -u expected current\n+    git diff expected current\n }\n \n # This is done on an empty work directory, which is the normal\ndiff --git a/t/t1001-read-tree-m-2way.sh b/t/t1001-read-tree-m-2way.sh\nindex 75e4c9a..030226b 100755\n--- a/t/t1001-read-tree-m-2way.sh\n+++ b/t/t1001-read-tree-m-2way.sh\n@@ -33,7 +33,7 @@ compare_change () {\n \t    -e '/^--- /d; /^+++ /d; /^@@ /d;' \\\n \t    -e 's/^\\([-+][0-7][0-7][0-7][0-7][0-7][0-7]\\) '\"$_x40\"' /\\1 X /p' \\\n \t    \"$1\"\n-\tdiff -u expected current\n+\tgit diff expected current\n }\n \n check_cache_at () {\n@@ -86,7 +86,7 @@ test_expect_success \\\n     'rm -f .git/index &&\n      read_tree_twoway $treeH $treeM &&\n      git-ls-files --stage >1-3.out &&\n-     diff -u M.out 1-3.out &&\n+     git diff M.out 1-3.out &&\n      check_cache_at bozbar dirty &&\n      check_cache_at frotz dirty &&\n      check_cache_at nitfol dirty'\n@@ -101,7 +101,7 @@ test_expect_success \\\n      git-update-index --add yomin &&\n      read_tree_twoway $treeH $treeM &&\n      git-ls-files --stage >4.out || return 1\n-     diff -u M.out 4.out >4diff.out\n+     git diff M.out 4.out >4diff.out\n      compare_change 4diff.out expected &&\n      check_cache_at yomin clean'\n \n@@ -115,7 +115,7 @@ test_expect_success \\\n      echo yomin yomin >yomin &&\n      read_tree_twoway $treeH $treeM &&\n      git-ls-files --stage >5.out || return 1\n-     diff -u M.out 5.out >5diff.out\n+     git diff M.out 5.out >5diff.out\n      compare_change 5diff.out expected &&\n      check_cache_at yomin dirty'\n \n@@ -127,7 +127,7 @@ test_expect_success \\\n      git-update-index --add frotz &&\n      read_tree_twoway $treeH $treeM &&\n      git-ls-files --stage >6.out &&\n-     diff -u M.out 6.out &&\n+     git diff M.out 6.out &&\n      check_cache_at frotz clean'\n \n test_expect_success \\\n@@ -140,7 +140,7 @@ test_expect_success \\\n      echo frotz frotz >frotz &&\n      read_tree_twoway $treeH $treeM &&\n      git-ls-files --stage >7.out &&\n-     diff -u M.out 7.out &&\n+     git diff M.out 7.out &&\n      check_cache_at frotz dirty'\n \n test_expect_success \\\n@@ -171,7 +171,7 @@ test_expect_success \\\n      git-update-index --add rezrov &&\n      read_tree_twoway $treeH $treeM &&\n      git-ls-files --stage >10.out &&\n-     diff -u M.out 10.out'\n+     git diff M.out 10.out'\n \n test_expect_success \\\n     '11 - dirty path removed.' \\\n@@ -216,7 +216,7 @@ test_expect_success \\\n      git-update-index --add nitfol &&\n      read_tree_twoway $treeH $treeM &&\n      git-ls-files --stage >14.out || return 1\n-     diff -u M.out 14.out >14diff.out\n+     git diff M.out 14.out >14diff.out\n      compare_change 14diff.out expected &&\n      check_cache_at nitfol clean'\n \n@@ -230,7 +230,7 @@ test_expect_success \\\n      echo nitfol nitfol nitfol >nitfol &&\n      read_tree_twoway $treeH $treeM &&\n      git-ls-files --stage >15.out || return 1\n-     diff -u M.out 15.out >15diff.out\n+     git diff M.out 15.out >15diff.out\n      compare_change 15diff.out expected &&\n      check_cache_at nitfol dirty'\n \n@@ -262,7 +262,7 @@ test_expect_success \\\n      git-update-index --add bozbar &&\n      read_tree_twoway $treeH $treeM &&\n      git-ls-files --stage >18.out &&\n-     diff -u M.out 18.out &&\n+     git diff M.out 18.out &&\n      check_cache_at bozbar clean'\n \n test_expect_success \\\n@@ -275,7 +275,7 @@ test_expect_success \\\n      echo gnusto gnusto >bozbar &&\n      read_tree_twoway $treeH $treeM &&\n      git-ls-files --stage >19.out &&\n-     diff -u M.out 19.out &&\n+     git diff M.out 19.out &&\n      check_cache_at bozbar dirty'\n \n test_expect_success \\\n@@ -287,7 +287,7 @@ test_expect_success \\\n      git-update-index --add bozbar &&\n      read_tree_twoway $treeH $treeM &&\n      git-ls-files --stage >20.out &&\n-     diff -u M.out 20.out &&\n+     git diff M.out 20.out &&\n      check_cache_at bozbar dirty'\n \n test_expect_success \\\n@@ -337,7 +337,7 @@ test_expect_success \\\n      git-update-index --add DF &&\n      read_tree_twoway $treeDF $treeDFDF &&\n      git-ls-files --stage >DFDFcheck.out &&\n-     diff -u DFDF.out DFDFcheck.out &&\n+     git diff DFDF.out DFDFcheck.out &&\n      check_cache_at DF/DF dirty &&\n      :'\n \ndiff --git a/t/t1002-read-tree-m-u-2way.sh b/t/t1002-read-tree-m-u-2way.sh\nindex da3c813..87fe993 100755\n--- a/t/t1002-read-tree-m-u-2way.sh\n+++ b/t/t1002-read-tree-m-u-2way.sh\n@@ -16,7 +16,7 @@ compare_change () {\n \tsed >current \\\n \t    -e '/^--- /d; /^+++ /d; /^@@ /d;' \\\n \t    -e 's/^\\(.[0-7][0-7][0-7][0-7][0-7][0-7]\\) '\"$_x40\"' /\\1 X /' \"$1\"\n-\tdiff -u expected current\n+\tgit diff expected current\n }\n \n check_cache_at () {\ndiff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh\nindex 49b5666..84a5939 100755\n--- a/t/t1300-repo-config.sh\n+++ b/t/t1300-repo-config.sh\n@@ -368,12 +368,12 @@ cat > expect << EOF\n weird\n EOF\n \n-test_expect_success \"rename succeeded\" \"diff -u expect .git/config\"\n+test_expect_success \"rename succeeded\" \"git diff expect .git/config\"\n \n test_expect_failure \"rename non-existing section\" \\\n \t'git-config --rename-section branch.\"world domination\" branch.drei'\n \n-test_expect_success \"rename succeeded\" \"diff -u expect .git/config\"\n+test_expect_success \"rename succeeded\" \"git diff expect .git/config\"\n \n test_expect_success \"rename another section\" \\\n \t'git-config --rename-section branch.\"1 234 blabl/a\" branch.drei'\n@@ -389,7 +389,7 @@ cat > expect << EOF\n weird\n EOF\n \n-test_expect_success \"rename succeeded\" \"diff -u expect .git/config\"\n+test_expect_success \"rename succeeded\" \"git diff expect .git/config\"\n \n test_expect_success numbers '\n \ndiff --git a/t/t3001-ls-files-others-exclude.sh b/t/t3001-ls-files-others-exclude.sh\nindex 6979b7c..db7a847 100755\n--- a/t/t3001-ls-files-others-exclude.sh\n+++ b/t/t3001-ls-files-others-exclude.sh\n@@ -65,7 +65,7 @@ test_expect_success \\\n        --exclude-per-directory=.gitignore \\\n        --exclude-from=.git/ignore \\\n        >output &&\n-     diff -u expect output'\n+     git diff expect output'\n \n # Test \\r\\n (MSDOS-like systems)\n printf '*.1\\r\\n/*.3\\r\\n!*.6\\r\\n' >.gitignore\n@@ -77,6 +77,6 @@ test_expect_success \\\n        --exclude-per-directory=.gitignore \\\n        --exclude-from=.git/ignore \\\n        >output &&\n-     diff -u expect output'\n+     git diff expect output'\n \n test_done\ndiff --git a/t/t3002-ls-files-dashpath.sh b/t/t3002-ls-files-dashpath.sh\nindex b42f138..cc8967d 100755\n--- a/t/t3002-ls-files-dashpath.sh\n+++ b/t/t3002-ls-files-dashpath.sh\n@@ -23,7 +23,7 @@ test_expect_success \\\n test_expect_success \\\n     'git-ls-files without path restriction.' \\\n     'git-ls-files --others >output &&\n-     diff -u output - <<EOF\n+     git diff output - <<EOF\n --\n -foo\n output\n@@ -34,7 +34,7 @@ EOF\n test_expect_success \\\n     'git-ls-files with path restriction.' \\\n     'git-ls-files --others path0 >output &&\n-\tdiff -u output - <<EOF\n+\tgit diff output - <<EOF\n path0\n EOF\n '\n@@ -42,7 +42,7 @@ EOF\n test_expect_success \\\n     'git-ls-files with path restriction with --.' \\\n     'git-ls-files --others -- path0 >output &&\n-\tdiff -u output - <<EOF\n+\tgit diff output - <<EOF\n path0\n EOF\n '\n@@ -50,7 +50,7 @@ EOF\n test_expect_success \\\n     'git-ls-files with path restriction with -- --.' \\\n     'git-ls-files --others -- -- >output &&\n-\tdiff -u output - <<EOF\n+\tgit diff output - <<EOF\n --\n EOF\n '\n@@ -58,7 +58,7 @@ EOF\n test_expect_success \\\n     'git-ls-files with no path restriction.' \\\n     'git-ls-files --others -- >output &&\n-\tdiff -u output - <<EOF\n+\tgit diff output - <<EOF\n --\n -foo\n output\ndiff --git a/t/t3100-ls-tree-restrict.sh b/t/t3100-ls-tree-restrict.sh\nindex 2ec06d3..e107492 100755\n--- a/t/t3100-ls-tree-restrict.sh\n+++ b/t/t3100-ls-tree-restrict.sh\n@@ -35,7 +35,7 @@ _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'\n _x40=\"$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40\"\n test_output () {\n     sed -e \"s/ $_x40\t/ X\t/\" <current >check\n-    diff -u expected check\n+    git diff expected check\n }\n \n test_expect_success \\\ndiff --git a/t/t3101-ls-tree-dirname.sh b/t/t3101-ls-tree-dirname.sh\nindex d78deb1..087929a 100755\n--- a/t/t3101-ls-tree-dirname.sh\n+++ b/t/t3101-ls-tree-dirname.sh\n@@ -43,7 +43,7 @@ _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'\n _x40=\"$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40\"\n test_output () {\n     sed -e \"s/ $_x40\t/ X\t/\" <current >check\n-    diff -u expected check\n+    git diff expected check\n }\n \n test_expect_success \\\ndiff --git a/t/t3300-funny-names.sh b/t/t3300-funny-names.sh\nindex c12270e..b5a1400 100755\n--- a/t/t3300-funny-names.sh\n+++ b/t/t3300-funny-names.sh\n@@ -35,7 +35,7 @@ no-funny' >expected\n test_expect_success 'git-ls-files no-funny' \\\n \t'git-update-index --add \"$p0\" \"$p2\" &&\n \tgit-ls-files >current &&\n-\tdiff -u expected current'\n+\tgit diff expected current'\n \n t0=`git-write-tree`\n echo \"$t0\" >t0\n@@ -48,14 +48,14 @@ EOF\n test_expect_success 'git-ls-files with-funny' \\\n \t'git-update-index --add \"$p1\" &&\n \tgit-ls-files >current &&\n-\tdiff -u expected current'\n+\tgit diff expected current'\n \n echo 'just space\n no-funny\n tabs\t,\" (dq) and spaces' >expected\n test_expect_success 'git-ls-files -z with-funny' \\\n \t'git-ls-files -z | tr \\\\0 \\\\012 >current &&\n-\tdiff -u expected current'\n+\tgit diff expected current'\n \n t1=`git-write-tree`\n echo \"$t1\" >t1\n@@ -67,28 +67,28 @@ no-funny\n EOF\n test_expect_success 'git-ls-tree with funny' \\\n \t'git-ls-tree -r $t1 | sed -e \"s/^[^\t]*\t//\" >current &&\n-\t diff -u expected current'\n+\t git diff expected current'\n \n cat > expected <<\\EOF\n A\t\"tabs\\t,\\\" (dq) and spaces\"\n EOF\n test_expect_success 'git-diff-index with-funny' \\\n \t'git-diff-index --name-status $t0 >current &&\n-\tdiff -u expected current'\n+\tgit diff expected current'\n \n test_expect_success 'git-diff-tree with-funny' \\\n \t'git-diff-tree --name-status $t0 $t1 >current &&\n-\tdiff -u expected current'\n+\tgit diff expected current'\n \n echo 'A\n tabs\t,\" (dq) and spaces' >expected\n test_expect_success 'git-diff-index -z with-funny' \\\n \t'git-diff-index -z --name-status $t0 | tr \\\\0 \\\\012 >current &&\n-\tdiff -u expected current'\n+\tgit diff expected current'\n \n test_expect_success 'git-diff-tree -z with-funny' \\\n \t'git-diff-tree -z --name-status $t0 $t1 | tr \\\\0 \\\\012 >current &&\n-\tdiff -u expected current'\n+\tgit diff expected current'\n \n cat > expected <<\\EOF\n CNUM\tno-funny\t\"tabs\\t,\\\" (dq) and spaces\"\n@@ -96,7 +96,7 @@ EOF\n test_expect_success 'git-diff-tree -C with-funny' \\\n \t'git-diff-tree -C --find-copies-harder --name-status \\\n \t\t$t0 $t1 | sed -e 's/^C[0-9]*/CNUM/' >current &&\n-\tdiff -u expected current'\n+\tgit diff expected current'\n \n cat > expected <<\\EOF\n RNUM\tno-funny\t\"tabs\\t,\\\" (dq) and spaces\"\n@@ -105,7 +105,7 @@ test_expect_success 'git-diff-tree delete with-funny' \\\n \t'git-update-index --force-remove \"$p0\" &&\n \tgit-diff-index -M --name-status \\\n \t\t$t0 | sed -e 's/^R[0-9]*/RNUM/' >current &&\n-\tdiff -u expected current'\n+\tgit diff expected current'\n \n cat > expected <<\\EOF\n diff --git a/no-funny \"b/tabs\\t,\\\" (dq) and spaces\"\n@@ -116,7 +116,7 @@ EOF\n test_expect_success 'git-diff-tree delete with-funny' \\\n \t'git-diff-index -M -p $t0 |\n \t sed -e \"s/index [0-9]*%/index NUM%/\" >current &&\n-\t diff -u expected current'\n+\t git diff expected current'\n \n chmod +x \"$p1\"\n cat > expected <<\\EOF\n@@ -130,7 +130,7 @@ EOF\n test_expect_success 'git-diff-tree delete with-funny' \\\n \t'git-diff-index -M -p $t0 |\n \t sed -e \"s/index [0-9]*%/index NUM%/\" >current &&\n-\t diff -u expected current'\n+\t git diff expected current'\n \n cat >expected <<\\EOF\n  \"tabs\\t,\\\" (dq) and spaces\"\n@@ -139,7 +139,7 @@ EOF\n test_expect_success 'git-diff-tree rename with-funny applied' \\\n \t'git-diff-index -M -p $t0 |\n \t git-apply --stat | sed -e \"s/|.*//\" -e \"s/ *\\$//\" >current &&\n-\t diff -u expected current'\n+\t git diff expected current'\n \n cat > expected <<\\EOF\n  no-funny\n@@ -149,12 +149,12 @@ EOF\n test_expect_success 'git-diff-tree delete with-funny applied' \\\n \t'git-diff-index -p $t0 |\n \t git-apply --stat | sed -e \"s/|.*//\" -e \"s/ *\\$//\" >current &&\n-\t diff -u expected current'\n+\t git diff expected current'\n \n test_expect_success 'git-apply non-git diff' \\\n \t'git-diff-index -p $t0 |\n \t sed -ne \"/^[-+@]/p\" |\n \t git-apply --stat | sed -e \"s/|.*//\" -e \"s/ *\\$//\" >current &&\n-\t diff -u expected current'\n+\t git diff expected current'\n \n test_done\ndiff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh\nindex e54fe0f..ffddb68 100755\n--- a/t/t3900-i18n-commit.sh\n+++ b/t/t3900-i18n-commit.sh\n@@ -9,7 +9,7 @@ test_description='commit and log output encodings'\n \n compare_with () {\n \tgit-show -s $1 | sed -e '1,/^$/d' -e 's/^    //' -e '$d' >current &&\n-\tdiff -u current \"$2\"\n+\tgit diff current \"$2\"\n }\n \n test_expect_success setup '\ndiff --git a/t/t4006-diff-mode.sh b/t/t4006-diff-mode.sh\nindex ca342f4..e72c6fd 100755\n--- a/t/t4006-diff-mode.sh\n+++ b/t/t4006-diff-mode.sh\n@@ -38,7 +38,7 @@ echo \":100644 100755 X X M\trezrov\" >expected\n \n test_expect_success \\\n     'verify' \\\n-    'diff -u expected check'\n+    'git diff expected check'\n \n test_done\n \ndiff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh\nindex 3d85cea..9f54af5 100755\n--- a/t/t4013-diff-various.sh\n+++ b/t/t4013-diff-various.sh\n@@ -111,7 +111,7 @@ do\n \t\t} >\"$actual\" &&\n \t\tif test -f \"$expect\"\n \t\tthen\n-\t\t\tdiff -u \"$expect\" \"$actual\" &&\n+\t\t\tgit diff \"$expect\" \"$actual\" &&\n \t\t\trm -f \"$actual\"\n \t\telse\n \t\t\t# this is to help developing new tests.\ndiff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh\nindex adf4993..930e209 100755\n--- a/t/t4015-diff-whitespace.sh\n+++ b/t/t4015-diff-whitespace.sh\n@@ -43,13 +43,13 @@ index adf3937..6edc172 100644\n EOF\n \n git-diff > out\n-test_expect_success \"Ray's example without options\" 'diff -u expect out'\n+test_expect_success \"Ray's example without options\" 'git diff expect out'\n \n git-diff -w > out\n-test_expect_success \"Ray's example with -w\" 'diff -u expect out'\n+test_expect_success \"Ray's example with -w\" 'git diff expect out'\n \n git-diff -b > out\n-test_expect_success \"Ray's example with -b\" 'diff -u expect out'\n+test_expect_success \"Ray's example with -b\" 'git diff expect out'\n \n tr 'Q' '\\015' << EOF > x\n whitespace at beginning\n@@ -90,14 +90,14 @@ index d99af23..8b32fb5 100644\n +CR at end\n EOF\n git-diff > out\n-test_expect_success 'another test, without options' 'diff -u expect out'\n+test_expect_success 'another test, without options' 'git diff expect out'\n \n cat << EOF > expect\n diff --git a/x b/x\n index d99af23..8b32fb5 100644\n EOF\n git-diff -w > out\n-test_expect_success 'another test, with -w' 'diff -u expect out'\n+test_expect_success 'another test, with -w' 'git diff expect out'\n \n tr 'Q' '\\015' << EOF > expect\n diff --git a/x b/x\n@@ -115,6 +115,6 @@ index d99af23..8b32fb5 100644\n  CR at endQ\n EOF\n git-diff -b > out\n-test_expect_success 'another test, with -b' 'diff -u expect out'\n+test_expect_success 'another test, with -b' 'git diff expect out'\n \n test_done\ndiff --git a/t/t4016-diff-quote.sh b/t/t4016-diff-quote.sh\nindex 2e7cd5f..5dbdc0c 100755\n--- a/t/t4016-diff-quote.sh\n+++ b/t/t4016-diff-quote.sh\n@@ -49,7 +49,7 @@ cat >expect <<\\EOF\n EOF\n test_expect_success 'git diff --summary -M HEAD' '\n \tgit diff --summary -M HEAD >actual &&\n-\tdiff -u expect actual\n+\tgit diff expect actual\n '\n \n cat >expect <<\\EOF\n@@ -64,7 +64,7 @@ cat >expect <<\\EOF\n EOF\n test_expect_success 'git diff --stat -M HEAD' '\n \tgit diff --stat -M HEAD >actual &&\n-\tdiff -u expect actual\n+\tgit diff expect actual\n '\n \n test_done\ndiff --git a/t/t4100-apply-stat.sh b/t/t4100-apply-stat.sh\nindex 6579f06..7b81c32 100755\n--- a/t/t4100-apply-stat.sh\n+++ b/t/t4100-apply-stat.sh\n@@ -11,37 +11,37 @@ test_description='git-apply --stat --summary test.\n test_expect_success \\\n     'rename' \\\n     'git-apply --stat --summary <../t4100/t-apply-1.patch >current &&\n-    diff -u ../t4100/t-apply-1.expect current'\n+    git diff ../t4100/t-apply-1.expect current'\n \n test_expect_success \\\n     'copy' \\\n     'git-apply --stat --summary <../t4100/t-apply-2.patch >current &&\n-    diff -u ../t4100/t-apply-2.expect current'\n+    git diff ../t4100/t-apply-2.expect current'\n \n test_expect_success \\\n     'rewrite' \\\n     'git-apply --stat --summary <../t4100/t-apply-3.patch >current &&\n-    diff -u ../t4100/t-apply-3.expect current'\n+    git diff ../t4100/t-apply-3.expect current'\n \n test_expect_success \\\n     'mode' \\\n     'git-apply --stat --summary <../t4100/t-apply-4.patch >current &&\n-    diff -u ../t4100/t-apply-4.expect current'\n+    git diff ../t4100/t-apply-4.expect current'\n \n test_expect_success \\\n     'non git' \\\n     'git-apply --stat --summary <../t4100/t-apply-5.patch >current &&\n-    diff -u ../t4100/t-apply-5.expect current'\n+    git diff ../t4100/t-apply-5.expect current'\n \n test_expect_success \\\n     'non git' \\\n     'git-apply --stat --summary <../t4100/t-apply-6.patch >current &&\n-    diff -u ../t4100/t-apply-6.expect current'\n+    git diff ../t4100/t-apply-6.expect current'\n \n test_expect_success \\\n     'non git' \\\n     'git-apply --stat --summary <../t4100/t-apply-7.patch >current &&\n-    diff -u ../t4100/t-apply-7.expect current'\n+    git diff ../t4100/t-apply-7.expect current'\n \n test_done\n \ndiff --git a/t/t4104-apply-boundary.sh b/t/t4104-apply-boundary.sh\nindex 2ff800c..a5fb3ea 100755\n--- a/t/t4104-apply-boundary.sh\n+++ b/t/t4104-apply-boundary.sh\n@@ -90,7 +90,7 @@ do\n \t\t\t\tcat '\"$kind-patch.$with\"'\n \t\t\t\t(exit 1)\n \t\t\t} &&\n-\t\t\tdiff -u '\"$kind\"'-expect victim\n+\t\t\tgit diff '\"$kind\"'-expect victim\n \t\t'\n \tdone\n done\n@@ -108,7 +108,7 @@ do\n \t\t\tcat '\"$kind-ng.without\"'\n \t\t\t(exit 1)\n \t\t} &&\n-\t\tdiff -u '\"$kind\"'-expect victim\n+\t\tgit diff '\"$kind\"'-expect victim\n \t'\n done\n \ndiff --git a/t/t4115-apply-symlink.sh b/t/t4115-apply-symlink.sh\nindex d5f2cfb..b947ed8 100755\n--- a/t/t4115-apply-symlink.sh\n+++ b/t/t4115-apply-symlink.sh\n@@ -33,7 +33,7 @@ test_expect_success 'apply symlink patch' '\n \tgit checkout side &&\n \tgit apply patch &&\n \tgit diff-files -p >patched &&\n-\tdiff -u patch patched\n+\tgit diff patch patched\n \n '\n \n@@ -42,7 +42,7 @@ test_expect_success 'apply --index symlink patch' '\n \tgit checkout -f side &&\n \tgit apply --index patch &&\n \tgit diff-index --cached -p HEAD >patched &&\n-\tdiff -u patch patched\n+\tgit diff patch patched\n \n '\n \ndiff --git a/t/t4116-apply-reverse.sh b/t/t4116-apply-reverse.sh\nindex aa2c869..2685b22 100755\n--- a/t/t4116-apply-reverse.sh\n+++ b/t/t4116-apply-reverse.sh\n@@ -42,7 +42,7 @@ test_expect_success 'apply in reverse' '\n \tgit reset --hard second &&\n \tgit apply --reverse --binary --index patch &&\n \tgit diff >diff &&\n-\tdiff -u /dev/null diff\n+\tgit diff /dev/null diff\n \n '\n \ndiff --git a/t/t4117-apply-reject.sh b/t/t4117-apply-reject.sh\nindex b4de075..91931f0 100755\n--- a/t/t4117-apply-reject.sh\n+++ b/t/t4117-apply-reject.sh\n@@ -54,7 +54,7 @@ test_expect_success 'apply without --reject should fail' '\n \t\texit 1\n \tfi\n \n-\tdiff -u file1 saved.file1\n+\tgit diff file1 saved.file1\n '\n \n test_expect_success 'apply without --reject should fail' '\n@@ -65,7 +65,7 @@ test_expect_success 'apply without --reject should fail' '\n \t\texit 1\n \tfi\n \n-\tdiff -u file1 saved.file1\n+\tgit diff file1 saved.file1\n '\n \n test_expect_success 'apply with --reject should fail but update the file' '\n@@ -79,7 +79,7 @@ test_expect_success 'apply with --reject should fail but update the file' '\n \t\texit 1\n \tfi\n \n-\tdiff -u file1 expected &&\n+\tgit diff file1 expected &&\n \n \tcat file1.rej &&\n \n@@ -105,7 +105,7 @@ test_expect_success 'apply with --reject should fail but update the file' '\n \t\techo \"file1 still exists?\"\n \t\texit 1\n \t}\n-\tdiff -u file2 expected &&\n+\tgit diff file2 expected &&\n \n \tcat file2.rej &&\n \n@@ -132,7 +132,7 @@ test_expect_success 'the same test with --verbose' '\n \t\techo \"file1 still exists?\"\n \t\texit 1\n \t}\n-\tdiff -u file2 expected &&\n+\tgit diff file2 expected &&\n \n \tcat file2.rej &&\n \n@@ -151,7 +151,7 @@ test_expect_success 'apply cleanly with --verbose' '\n \n \tgit apply --verbose patch.1 &&\n \n-\tdiff -u file1 clean\n+\tgit diff file1 clean\n '\n \n test_done\ndiff --git a/t/t4118-apply-empty-context.sh b/t/t4118-apply-empty-context.sh\nindex 7309422..690a182 100755\n--- a/t/t4118-apply-empty-context.sh\n+++ b/t/t4118-apply-empty-context.sh\n@@ -37,7 +37,7 @@ test_expect_success 'apply --numstat' '\n \t\techo \"0\t1\tfile1\" &&\n \t\techo \"0\t1\tfile2\"\n \t} >expect &&\n-\tdiff -u expect actual\n+\tgit diff expect actual\n \n '\n \n@@ -47,8 +47,8 @@ test_expect_success 'apply --apply' '\n \tcat file2.orig >file2 &&\n \tgit update-index file1 file2 &&\n \tgit apply --index diff.output &&\n-\tdiff -u file1.mods file1 &&\n-\tdiff -u file2.mods file2\n+\tgit diff file1.mods file1 &&\n+\tgit diff file2.mods file2\n '\n \n test_done\ndiff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh\nindex c571a1b..dc802f6 100755\n--- a/t/t4200-rerere.sh\n+++ b/t/t4200-rerere.sh\n@@ -70,7 +70,7 @@ EOF\n \n git rerere diff > out\n \n-test_expect_success 'rerere diff' 'diff -u expect out'\n+test_expect_success 'rerere diff' 'git diff expect out'\n \n cat > expect << EOF\n a1\n@@ -78,7 +78,7 @@ EOF\n \n git rerere status > out\n \n-test_expect_success 'rerere status' 'diff -u expect out'\n+test_expect_success 'rerere status' 'git diff expect out'\n \n test_expect_success 'commit succeeds' \\\n \t\"git commit -q -a -m 'prefer first over second'\"\n@@ -94,7 +94,7 @@ test_expect_failure 'another conflicting merge' 'git pull . first'\n git show first:a1 | sed 's/To die: t/To die! T/' > expect\n test_expect_success 'rerere kicked in' \"! grep ======= a1\"\n \n-test_expect_success 'rerere prefers first change' 'diff -u a1 expect'\n+test_expect_success 'rerere prefers first change' 'git diff a1 expect'\n \n rm $rr/postimage\n echo \"$sha1\ta1\" | tr '\\012' '\\0' > .git/rr-cache/MERGE_RR\ndiff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh\nindex 7d93d0d..fc4a126 100755\n--- a/t/t5400-send-pack.sh\n+++ b/t/t5400-send-pack.sh\n@@ -110,7 +110,7 @@ test_expect_success \\\n \tcd .. &&\n \tgit-update-ref refs/heads/master master^ &&\n \tgit-send-pack --force ./victim/.git/ master &&\n-\t! diff -u .git/refs/heads/master victim/.git/refs/heads/master\n+\t! git diff .git/refs/heads/master victim/.git/refs/heads/master\n '\n \n test_done\ndiff --git a/t/t5401-update-hooks.sh b/t/t5401-update-hooks.sh\nindex 0514056..460c9fd 100755\n--- a/t/t5401-update-hooks.sh\n+++ b/t/t5401-update-hooks.sh\n@@ -51,12 +51,12 @@ test_expect_success 'hooks ran' '\n \n test_expect_success 'update hook arguments' '\n \techo refs/heads/master $commit0 $commit1 |\n-\tdiff -u - victim/.git/update.args\n+\tgit diff - victim/.git/update.args\n '\n \n test_expect_success 'post-update hook arguments' '\n \techo refs/heads/master |\n-\tdiff -u - victim/.git/post-update.args\n+\tgit diff - victim/.git/post-update.args\n '\n \n test_expect_failure 'update hook stdin is /dev/null' '\ndiff --git a/t/t6023-merge-file.sh b/t/t6023-merge-file.sh\nindex f3cd3db..c76fccf 100644\n--- a/t/t6023-merge-file.sh\n+++ b/t/t6023-merge-file.sh\n@@ -63,7 +63,7 @@ test_expect_success \"merge without conflict (missing LF at EOF)\" \\\n \t\"git-merge-file test2.txt orig.txt new2.txt\"\n \n test_expect_success \"merge result added missing LF\" \\\n-\t\"diff -u test.txt test2.txt\"\n+\t\"git diff test.txt test2.txt\"\n \n cp test.txt backup.txt\n test_expect_failure \"merge with conflicts\" \\\n@@ -86,7 +86,7 @@ non timebo mala, quoniam tu mecum es:\n virga tua et baculus tuus ipsa me consolata sunt.\n EOF\n \n-test_expect_success \"expected conflict markers\" \"diff -u test.txt expect.txt\"\n+test_expect_success \"expected conflict markers\" \"git diff test.txt expect.txt\"\n \n cp backup.txt test.txt\n test_expect_failure \"merge with conflicts, using -L\" \\\n@@ -110,7 +110,7 @@ virga tua et baculus tuus ipsa me consolata sunt.\n EOF\n \n test_expect_success \"expected conflict markers, with -L\" \\\n-\t\"diff -u test.txt expect.txt\"\n+\t\"git diff test.txt expect.txt\"\n \n sed \"s/ tu / TU /\" < new1.txt > new5.txt\n test_expect_failure \"conflict in removed tail\" \\\n@@ -132,7 +132,7 @@ virga tua et baculus tuus ipsa me consolata sunt.\n >>>>>>> new5.txt\n EOF\n \n-test_expect_success \"expected conflict markers\" \"diff -u expect out\"\n+test_expect_success \"expected conflict markers\" \"git diff expect out\"\n \n test_done\n \ndiff --git a/t/t6024-recursive-merge.sh b/t/t6024-recursive-merge.sh\nindex 31b9625..a398556 100644\n--- a/t/t6024-recursive-merge.sh\n+++ b/t/t6024-recursive-merge.sh\n@@ -70,7 +70,7 @@ G\n >>>>>>> G:a1\n EOF\n \n-test_expect_success \"result contains a conflict\" \"diff -u expect a1\"\n+test_expect_success \"result contains a conflict\" \"git diff expect a1\"\n \n git ls-files --stage > out\n cat > expect << EOF\n@@ -79,6 +79,6 @@ cat > expect << EOF\n 100644 fd7923529855d0b274795ae3349c5e0438333979 3\ta1\n EOF\n \n-test_expect_success \"virtual trees were processed\" \"diff -u expect out\"\n+test_expect_success \"virtual trees were processed\" \"git diff expect out\"\n \n test_done\ndiff --git a/t/t6200-fmt-merge-msg.sh b/t/t6200-fmt-merge-msg.sh\nindex ea14023..526d7d1 100755\n--- a/t/t6200-fmt-merge-msg.sh\n+++ b/t/t6200-fmt-merge-msg.sh\n@@ -79,7 +79,7 @@ test_expect_success 'merge-msg test #1' '\n \tgit fetch . left &&\n \n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual &&\n-\tdiff -u actual expected\n+\tgit diff actual expected\n '\n \n cat >expected <<\\EOF\n@@ -92,7 +92,7 @@ test_expect_success 'merge-msg test #2' '\n \tgit fetch ../trash left &&\n \n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual &&\n-\tdiff -u actual expected\n+\tgit diff actual expected\n '\n \n cat >expected <<\\EOF\n@@ -115,7 +115,7 @@ test_expect_success 'merge-msg test #3' '\n \tgit fetch . left &&\n \n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual &&\n-\tdiff -u actual expected\n+\tgit diff actual expected\n '\n \n cat >expected <<\\EOF\n@@ -145,7 +145,7 @@ test_expect_success 'merge-msg test #4' '\n \tgit fetch . left right &&\n \n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual &&\n-\tdiff -u actual expected\n+\tgit diff actual expected\n '\n \n test_expect_success 'merge-msg test #5' '\n@@ -157,7 +157,7 @@ test_expect_success 'merge-msg test #5' '\n \tgit fetch . left right &&\n \n \tgit fmt-merge-msg <.git/FETCH_HEAD >actual &&\n-\tdiff -u actual expected\n+\tgit diff actual expected\n '\n \n test_done\ndiff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh\nindex 7dcfc7e..eb628fe 100755\n--- a/t/t9100-git-svn-basic.sh\n+++ b/t/t9100-git-svn-basic.sh\n@@ -169,7 +169,7 @@ test_expect_success \"$name\" \"\n \tsvn up '$SVN_TREE' &&\n \ttest -f '$SVN_TREE'/exec-2.sh &&\n \ttest ! -L '$SVN_TREE'/exec-2.sh &&\n-\tdiff -u help $SVN_TREE/exec-2.sh\"\n+\tgit diff help $SVN_TREE/exec-2.sh\"\n \n if test \"$have_utf8\" = t\n then\n@@ -193,7 +193,7 @@ test_expect_success \"$name\" \\\n     \"git-svn init $svnrepo && git-svn fetch &&\n      git-rev-list --pretty=raw remotes/git-svn | grep ^tree | uniq > a &&\n      git-rev-list --pretty=raw remotes/alt | grep ^tree | uniq > b &&\n-     diff -u a b\"\n+     git diff a b\"\n \n name='check imported tree checksums expected tree checksums'\n rm -f expected\n@@ -211,7 +211,7 @@ tree d667270a1f7b109f5eb3aaea21ede14b56bfdd6e\n tree 8f51f74cf0163afc9ad68a4b1537288c4558b5a4\n EOF\n \n-test_expect_success \"$name\" \"diff -u a expected\"\n+test_expect_success \"$name\" \"git diff a expected\"\n \n test_expect_failure 'exit if remote refs are ambigious' \"\n         git-config --add svn-remote.svn.fetch \\\ndiff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh\nindex 970d683..2337d83 100755\n--- a/t/t9300-fast-import.sh\n+++ b/t/t9300-fast-import.sh\n@@ -74,7 +74,7 @@ EOF\n test_expect_success \\\n \t'A: verify commit' \\\n \t'git-cat-file commit master | sed 1d >actual &&\n-\tdiff -u expect actual'\n+\tgit diff expect actual'\n \n cat >expect <<EOF\n 100644 blob file2\n@@ -84,22 +84,22 @@ EOF\n test_expect_success \\\n \t'A: verify tree' \\\n \t'git-cat-file -p master^{tree} | sed \"s/ [0-9a-f]*\t/ /\" >actual &&\n-\t diff -u expect actual'\n+\t git diff expect actual'\n \n echo \"$file2_data\" >expect\n test_expect_success \\\n \t'A: verify file2' \\\n-\t'git-cat-file blob master:file2 >actual && diff -u expect actual'\n+\t'git-cat-file blob master:file2 >actual && git diff expect actual'\n \n echo \"$file3_data\" >expect\n test_expect_success \\\n \t'A: verify file3' \\\n-\t'git-cat-file blob master:file3 >actual && diff -u expect actual'\n+\t'git-cat-file blob master:file3 >actual && git diff expect actual'\n \n printf \"$file4_data\" >expect\n test_expect_success \\\n \t'A: verify file4' \\\n-\t'git-cat-file blob master:file4 >actual && diff -u expect actual'\n+\t'git-cat-file blob master:file4 >actual && git diff expect actual'\n \n cat >expect <<EOF\n :2 `git-rev-parse --verify master:file2`\n@@ -109,7 +109,7 @@ cat >expect <<EOF\n EOF\n test_expect_success \\\n \t'A: verify marks output' \\\n-\t'diff -u expect marks.out'\n+\t'git diff expect marks.out'\n \n ###\n ### series B\n@@ -175,7 +175,7 @@ EOF\n test_expect_success \\\n \t'C: verify commit' \\\n \t'git-cat-file commit branch | sed 1d >actual &&\n-\t diff -u expect actual'\n+\t git diff expect actual'\n \n cat >expect <<EOF\n :000000 100755 0000000000000000000000000000000000000000 f1fb5da718392694d0076d677d6d0e364c79b0bc A\tfile2/newf\n@@ -232,13 +232,13 @@ echo \"$file5_data\" >expect\n test_expect_success \\\n \t'D: verify file5' \\\n \t'git-cat-file blob branch:newdir/interesting >actual &&\n-\t diff -u expect actual'\n+\t git diff expect actual'\n \n echo \"$file6_data\" >expect\n test_expect_success \\\n \t'D: verify file6' \\\n \t'git-cat-file blob branch:newdir/exec.sh >actual &&\n-\t diff -u expect actual'\n+\t git diff expect actual'\n \n ###\n ### series E\n@@ -274,7 +274,7 @@ EOF\n test_expect_success \\\n \t'E: verify commit' \\\n \t'git-cat-file commit branch | sed 1,2d >actual &&\n-\tdiff -u expect actual'\n+\tgit diff expect actual'\n \n ###\n ### series F\n@@ -327,7 +327,7 @@ EOF\n test_expect_success \\\n \t'F: verify other commit' \\\n \t'git-cat-file commit other >actual &&\n-\tdiff -u expect actual'\n+\tgit diff expect actual'\n \n ###\n ### series G\n@@ -405,7 +405,7 @@ echo \"$file5_data\" >expect\n test_expect_success \\\n \t'H: verify file' \\\n \t'git-cat-file blob H:h/e/l/lo >actual &&\n-\t diff -u expect actual'\n+\t git diff expect actual'\n \n ###\n ### series I\n@@ -431,7 +431,7 @@ EOF\n test_expect_success \\\n \t'I: verify edge list' \\\n \t'sed -e s/pack-.*pack/pack-.pack/ edges.list >actual &&\n-\t diff -u expect actual'\n+\t git diff expect actual'\n \n ###\n ### series J\n-- \n1.5.0.1.788.g8ca52\n"}]}