summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0c725f1)
raw | patch | inline | side by side (parent: 0c725f1)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Sun, 25 Feb 2007 22:36:53 +0000 (23:36 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 4 Mar 2007 08:24:15 +0000 (00:24 -0800) |
Now that "git diff" handles stdin and relative paths outside the
working tree correctly, we can convert all instances of "diff -u"
to "git diff".
This commit is really the result of
$ perl -pi.bak -e 's/diff -u/git diff/' $(git grep -l "diff -u" t/)
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
(cherry picked from commit c699a40d68215c7e44a5b26117a35c8a56fbd387)
working tree correctly, we can convert all instances of "diff -u"
to "git diff".
This commit is really the result of
$ perl -pi.bak -e 's/diff -u/git diff/' $(git grep -l "diff -u" t/)
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
(cherry picked from commit c699a40d68215c7e44a5b26117a35c8a56fbd387)
29 files changed:
diff --git a/t/diff-lib.sh b/t/diff-lib.sh
index 745a1b03116a58f89cc9ac533f948fa91c795518..4624fe654c2515afe14e9e05402ac9ce78322772 100755 (executable)
--- a/t/diff-lib.sh
+++ b/t/diff-lib.sh
sed -e "$sanitize_diff_raw" <"$1" >.tmp-1
sed -e "$sanitize_diff_raw" <"$2" >.tmp-2
- diff -u .tmp-1 .tmp-2 && rm -f .tmp-1 .tmp-2
+ git diff .tmp-1 .tmp-2 && rm -f .tmp-1 .tmp-2
}
sanitize_diff_raw_z='/^:/s/ '"$_x40"' '"$_x40"' \([A-Z]\)[0-9]*$/ X X \1#/'
tr '\0' '\012' <"$1" | sed -e "$sanitize_diff_raw_z" >.tmp-1
tr '\0' '\012' <"$2" | sed -e "$sanitize_diff_raw_z" >.tmp-2
- diff -u .tmp-1 .tmp-2 && rm -f .tmp-1 .tmp-2
+ git diff .tmp-1 .tmp-2 && rm -f .tmp-1 .tmp-2
}
compare_diff_patch () {
/^[dis]*imilarity index [0-9]*%$/d
/^index [0-9a-f]*\.\.[0-9a-f]/d
' <"$2" >.tmp-2
- diff -u .tmp-1 .tmp-2 && rm -f .tmp-1 .tmp-2
+ git diff .tmp-1 .tmp-2 && rm -f .tmp-1 .tmp-2
}
index d0af8c3d52573fea203aab13612a9103cca78dd9..e26a36cf0f4c113d916c2d23daf036e4844be053 100755 (executable)
check_result () {
git-ls-files --stage | sed -e 's/ '"$_x40"' / X /' >current &&
- diff -u expected current
+ git diff expected current
}
# This is done on an empty work directory, which is the normal
index 75e4c9a88657e4ea28e0b4dfb7cbb2c3eaaa2f3f..030226bbfbd764a21aa59577b365868237d4f40b 100755 (executable)
-e '/^--- /d; /^+++ /d; /^@@ /d;' \
-e 's/^\([-+][0-7][0-7][0-7][0-7][0-7][0-7]\) '"$_x40"' /\1 X /p' \
"$1"
- diff -u expected current
+ git diff expected current
}
check_cache_at () {
'rm -f .git/index &&
read_tree_twoway $treeH $treeM &&
git-ls-files --stage >1-3.out &&
- diff -u M.out 1-3.out &&
+ git diff M.out 1-3.out &&
check_cache_at bozbar dirty &&
check_cache_at frotz dirty &&
check_cache_at nitfol dirty'
git-update-index --add yomin &&
read_tree_twoway $treeH $treeM &&
git-ls-files --stage >4.out || return 1
- diff -u M.out 4.out >4diff.out
+ git diff M.out 4.out >4diff.out
compare_change 4diff.out expected &&
check_cache_at yomin clean'
echo yomin yomin >yomin &&
read_tree_twoway $treeH $treeM &&
git-ls-files --stage >5.out || return 1
- diff -u M.out 5.out >5diff.out
+ git diff M.out 5.out >5diff.out
compare_change 5diff.out expected &&
check_cache_at yomin dirty'
git-update-index --add frotz &&
read_tree_twoway $treeH $treeM &&
git-ls-files --stage >6.out &&
- diff -u M.out 6.out &&
+ git diff M.out 6.out &&
check_cache_at frotz clean'
test_expect_success \
echo frotz frotz >frotz &&
read_tree_twoway $treeH $treeM &&
git-ls-files --stage >7.out &&
- diff -u M.out 7.out &&
+ git diff M.out 7.out &&
check_cache_at frotz dirty'
test_expect_success \
git-update-index --add rezrov &&
read_tree_twoway $treeH $treeM &&
git-ls-files --stage >10.out &&
- diff -u M.out 10.out'
+ git diff M.out 10.out'
test_expect_success \
'11 - dirty path removed.' \
git-update-index --add nitfol &&
read_tree_twoway $treeH $treeM &&
git-ls-files --stage >14.out || return 1
- diff -u M.out 14.out >14diff.out
+ git diff M.out 14.out >14diff.out
compare_change 14diff.out expected &&
check_cache_at nitfol clean'
echo nitfol nitfol nitfol >nitfol &&
read_tree_twoway $treeH $treeM &&
git-ls-files --stage >15.out || return 1
- diff -u M.out 15.out >15diff.out
+ git diff M.out 15.out >15diff.out
compare_change 15diff.out expected &&
check_cache_at nitfol dirty'
git-update-index --add bozbar &&
read_tree_twoway $treeH $treeM &&
git-ls-files --stage >18.out &&
- diff -u M.out 18.out &&
+ git diff M.out 18.out &&
check_cache_at bozbar clean'
test_expect_success \
echo gnusto gnusto >bozbar &&
read_tree_twoway $treeH $treeM &&
git-ls-files --stage >19.out &&
- diff -u M.out 19.out &&
+ git diff M.out 19.out &&
check_cache_at bozbar dirty'
test_expect_success \
git-update-index --add bozbar &&
read_tree_twoway $treeH $treeM &&
git-ls-files --stage >20.out &&
- diff -u M.out 20.out &&
+ git diff M.out 20.out &&
check_cache_at bozbar dirty'
test_expect_success \
git-update-index --add DF &&
read_tree_twoway $treeDF $treeDFDF &&
git-ls-files --stage >DFDFcheck.out &&
- diff -u DFDF.out DFDFcheck.out &&
+ git diff DFDF.out DFDFcheck.out &&
check_cache_at DF/DF dirty &&
:'
index da3c81357b8ffee7d6fc3f2d4301e9c3c9d076fd..87fe993f59e2b3843ea2abcd92a2bab77a392997 100755 (executable)
sed >current \
-e '/^--- /d; /^+++ /d; /^@@ /d;' \
-e 's/^\(.[0-7][0-7][0-7][0-7][0-7][0-7]\) '"$_x40"' /\1 X /' "$1"
- diff -u expected current
+ git diff expected current
}
check_cache_at () {
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 49b5666b33283feaf8ea2b7c09faeab8016c746d..84a59397b2427615165a243f2fd53e81ee8f8ce9 100755 (executable)
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
weird
EOF
-test_expect_success "rename succeeded" "diff -u expect .git/config"
+test_expect_success "rename succeeded" "git diff expect .git/config"
test_expect_failure "rename non-existing section" \
'git-config --rename-section branch."world domination" branch.drei'
-test_expect_success "rename succeeded" "diff -u expect .git/config"
+test_expect_success "rename succeeded" "git diff expect .git/config"
test_expect_success "rename another section" \
'git-config --rename-section branch."1 234 blabl/a" branch.drei'
weird
EOF
-test_expect_success "rename succeeded" "diff -u expect .git/config"
+test_expect_success "rename succeeded" "git diff expect .git/config"
test_expect_success numbers '
index 6979b7c1c05001d08ce94f9034580f94745b4924..db7a847a5dd13ece7a4ec22d795b8407631d7d4c 100755 (executable)
--exclude-per-directory=.gitignore \
--exclude-from=.git/ignore \
>output &&
- diff -u expect output'
+ git diff expect output'
# Test \r\n (MSDOS-like systems)
printf '*.1\r\n/*.3\r\n!*.6\r\n' >.gitignore
--exclude-per-directory=.gitignore \
--exclude-from=.git/ignore \
>output &&
- diff -u expect output'
+ git diff expect output'
test_done
index b42f1382bc9c585d12febcd99594f6ba7d7d743c..cc8967d76b10e18eb6b7db69fbb31baf702f2efc 100755 (executable)
test_expect_success \
'git-ls-files without path restriction.' \
'git-ls-files --others >output &&
- diff -u output - <<EOF
+ git diff output - <<EOF
--
-foo
output
test_expect_success \
'git-ls-files with path restriction.' \
'git-ls-files --others path0 >output &&
- diff -u output - <<EOF
+ git diff output - <<EOF
path0
EOF
'
test_expect_success \
'git-ls-files with path restriction with --.' \
'git-ls-files --others -- path0 >output &&
- diff -u output - <<EOF
+ git diff output - <<EOF
path0
EOF
'
test_expect_success \
'git-ls-files with path restriction with -- --.' \
'git-ls-files --others -- -- >output &&
- diff -u output - <<EOF
+ git diff output - <<EOF
--
EOF
'
test_expect_success \
'git-ls-files with no path restriction.' \
'git-ls-files --others -- >output &&
- diff -u output - <<EOF
+ git diff output - <<EOF
--
-foo
output
index 2ec06d3d3979aad18b4594329e93407d33f8cae5..e10749245b454f4c71486e536049cbf5b09259d5 100755 (executable)
_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
test_output () {
sed -e "s/ $_x40 / X /" <current >check
- diff -u expected check
+ git diff expected check
}
test_expect_success \
index d78deb1e710056e236ba61f4b8ceb55e11c44cbf..087929a4bfdf053124f81af3bfb73ab1e9e1709a 100755 (executable)
_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
test_output () {
sed -e "s/ $_x40 / X /" <current >check
- diff -u expected check
+ git diff expected check
}
test_expect_success \
diff --git a/t/t3300-funny-names.sh b/t/t3300-funny-names.sh
index c12270efab80e715e50440a0ae6d05555b055481..b5a1400e18b0fa5190fde4d0b60d1563581b2a19 100755 (executable)
--- a/t/t3300-funny-names.sh
+++ b/t/t3300-funny-names.sh
test_expect_success 'git-ls-files no-funny' \
'git-update-index --add "$p0" "$p2" &&
git-ls-files >current &&
- diff -u expected current'
+ git diff expected current'
t0=`git-write-tree`
echo "$t0" >t0
test_expect_success 'git-ls-files with-funny' \
'git-update-index --add "$p1" &&
git-ls-files >current &&
- diff -u expected current'
+ git diff expected current'
echo 'just space
no-funny
tabs ," (dq) and spaces' >expected
test_expect_success 'git-ls-files -z with-funny' \
'git-ls-files -z | tr \\0 \\012 >current &&
- diff -u expected current'
+ git diff expected current'
t1=`git-write-tree`
echo "$t1" >t1
EOF
test_expect_success 'git-ls-tree with funny' \
'git-ls-tree -r $t1 | sed -e "s/^[^ ]* //" >current &&
- diff -u expected current'
+ git diff expected current'
cat > expected <<\EOF
A "tabs\t,\" (dq) and spaces"
EOF
test_expect_success 'git-diff-index with-funny' \
'git-diff-index --name-status $t0 >current &&
- diff -u expected current'
+ git diff expected current'
test_expect_success 'git-diff-tree with-funny' \
'git-diff-tree --name-status $t0 $t1 >current &&
- diff -u expected current'
+ git diff expected current'
echo 'A
tabs ," (dq) and spaces' >expected
test_expect_success 'git-diff-index -z with-funny' \
'git-diff-index -z --name-status $t0 | tr \\0 \\012 >current &&
- diff -u expected current'
+ git diff expected current'
test_expect_success 'git-diff-tree -z with-funny' \
'git-diff-tree -z --name-status $t0 $t1 | tr \\0 \\012 >current &&
- diff -u expected current'
+ git diff expected current'
cat > expected <<\EOF
CNUM no-funny "tabs\t,\" (dq) and spaces"
test_expect_success 'git-diff-tree -C with-funny' \
'git-diff-tree -C --find-copies-harder --name-status \
$t0 $t1 | sed -e 's/^C[0-9]*/CNUM/' >current &&
- diff -u expected current'
+ git diff expected current'
cat > expected <<\EOF
RNUM no-funny "tabs\t,\" (dq) and spaces"
'git-update-index --force-remove "$p0" &&
git-diff-index -M --name-status \
$t0 | sed -e 's/^R[0-9]*/RNUM/' >current &&
- diff -u expected current'
+ git diff expected current'
cat > expected <<\EOF
diff --git a/no-funny "b/tabs\t,\" (dq) and spaces"
test_expect_success 'git-diff-tree delete with-funny' \
'git-diff-index -M -p $t0 |
sed -e "s/index [0-9]*%/index NUM%/" >current &&
- diff -u expected current'
+ git diff expected current'
chmod +x "$p1"
cat > expected <<\EOF
test_expect_success 'git-diff-tree delete with-funny' \
'git-diff-index -M -p $t0 |
sed -e "s/index [0-9]*%/index NUM%/" >current &&
- diff -u expected current'
+ git diff expected current'
cat >expected <<\EOF
"tabs\t,\" (dq) and spaces"
test_expect_success 'git-diff-tree rename with-funny applied' \
'git-diff-index -M -p $t0 |
git-apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
- diff -u expected current'
+ git diff expected current'
cat > expected <<\EOF
no-funny
test_expect_success 'git-diff-tree delete with-funny applied' \
'git-diff-index -p $t0 |
git-apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
- diff -u expected current'
+ git diff expected current'
test_expect_success 'git-apply non-git diff' \
'git-diff-index -p $t0 |
sed -ne "/^[-+@]/p" |
git-apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
- diff -u expected current'
+ git diff expected current'
test_done
diff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh
index e54fe0f4014d435f7d2da325bef3d7602a584d42..ffddb68db3abbf1ab14bf99f3c9514a7ee0c276b 100755 (executable)
--- a/t/t3900-i18n-commit.sh
+++ b/t/t3900-i18n-commit.sh
compare_with () {
git-show -s $1 | sed -e '1,/^$/d' -e 's/^ //' -e '$d' >current &&
- diff -u current "$2"
+ git diff current "$2"
}
test_expect_success setup '
diff --git a/t/t4006-diff-mode.sh b/t/t4006-diff-mode.sh
index ca342f48a198c2e98e4459273e8350bb7aed6328..e72c6fd1b4fa294e3e52fe55ab68c672bfc57e15 100755 (executable)
--- a/t/t4006-diff-mode.sh
+++ b/t/t4006-diff-mode.sh
test_expect_success \
'verify' \
- 'diff -u expected check'
+ 'git diff expected check'
test_done
index 3d85ceaae9e695d7b03d09cb082f1eef4f8406f2..9f54af5a1b56b05ed4eb3ea388ac87f80473ab2e 100755 (executable)
--- a/t/t4013-diff-various.sh
+++ b/t/t4013-diff-various.sh
} >"$actual" &&
if test -f "$expect"
then
- diff -u "$expect" "$actual" &&
+ git diff "$expect" "$actual" &&
rm -f "$actual"
else
# this is to help developing new tests.
index adf4993bacf05b4ccb0b447910dda6a2c453bc83..930e209d3136c855c3257e81d889e4dcf765595a 100755 (executable)
EOF
git-diff > out
-test_expect_success "Ray's example without options" 'diff -u expect out'
+test_expect_success "Ray's example without options" 'git diff expect out'
git-diff -w > out
-test_expect_success "Ray's example with -w" 'diff -u expect out'
+test_expect_success "Ray's example with -w" 'git diff expect out'
git-diff -b > out
-test_expect_success "Ray's example with -b" 'diff -u expect out'
+test_expect_success "Ray's example with -b" 'git diff expect out'
tr 'Q' '\015' << EOF > x
whitespace at beginning
+CR at end
EOF
git-diff > out
-test_expect_success 'another test, without options' 'diff -u expect out'
+test_expect_success 'another test, without options' 'git diff expect out'
cat << EOF > expect
diff --git a/x b/x
index d99af23..8b32fb5 100644
EOF
git-diff -w > out
-test_expect_success 'another test, with -w' 'diff -u expect out'
+test_expect_success 'another test, with -w' 'git diff expect out'
tr 'Q' '\015' << EOF > expect
diff --git a/x b/x
CR at endQ
EOF
git-diff -b > out
-test_expect_success 'another test, with -b' 'diff -u expect out'
+test_expect_success 'another test, with -b' 'git diff expect out'
test_done
diff --git a/t/t4016-diff-quote.sh b/t/t4016-diff-quote.sh
index 2e7cd5f255ce01e0143963aa69e24a4f33ea8325..5dbdc0c9faf81ea95939fec0c285b2020e07a8d9 100755 (executable)
--- a/t/t4016-diff-quote.sh
+++ b/t/t4016-diff-quote.sh
EOF
test_expect_success 'git diff --summary -M HEAD' '
git diff --summary -M HEAD >actual &&
- diff -u expect actual
+ git diff expect actual
'
cat >expect <<\EOF
EOF
test_expect_success 'git diff --stat -M HEAD' '
git diff --stat -M HEAD >actual &&
- diff -u expect actual
+ git diff expect actual
'
test_done
diff --git a/t/t4100-apply-stat.sh b/t/t4100-apply-stat.sh
index 6579f06b05c91f00f4f45015894f2bfab1076bf6..7b81c32e57f502f2c6d952bd9b7e6b432e092372 100755 (executable)
--- a/t/t4100-apply-stat.sh
+++ b/t/t4100-apply-stat.sh
test_expect_success \
'rename' \
'git-apply --stat --summary <../t4100/t-apply-1.patch >current &&
- diff -u ../t4100/t-apply-1.expect current'
+ git diff ../t4100/t-apply-1.expect current'
test_expect_success \
'copy' \
'git-apply --stat --summary <../t4100/t-apply-2.patch >current &&
- diff -u ../t4100/t-apply-2.expect current'
+ git diff ../t4100/t-apply-2.expect current'
test_expect_success \
'rewrite' \
'git-apply --stat --summary <../t4100/t-apply-3.patch >current &&
- diff -u ../t4100/t-apply-3.expect current'
+ git diff ../t4100/t-apply-3.expect current'
test_expect_success \
'mode' \
'git-apply --stat --summary <../t4100/t-apply-4.patch >current &&
- diff -u ../t4100/t-apply-4.expect current'
+ git diff ../t4100/t-apply-4.expect current'
test_expect_success \
'non git' \
'git-apply --stat --summary <../t4100/t-apply-5.patch >current &&
- diff -u ../t4100/t-apply-5.expect current'
+ git diff ../t4100/t-apply-5.expect current'
test_expect_success \
'non git' \
'git-apply --stat --summary <../t4100/t-apply-6.patch >current &&
- diff -u ../t4100/t-apply-6.expect current'
+ git diff ../t4100/t-apply-6.expect current'
test_expect_success \
'non git' \
'git-apply --stat --summary <../t4100/t-apply-7.patch >current &&
- diff -u ../t4100/t-apply-7.expect current'
+ git diff ../t4100/t-apply-7.expect current'
test_done
index 2ff800c23f8f833393c9eb7f50c89bd1a790094f..a5fb3ea40e4fde9126e66ed46fd3fc337b40ff66 100755 (executable)
cat '"$kind-patch.$with"'
(exit 1)
} &&
- diff -u '"$kind"'-expect victim
+ git diff '"$kind"'-expect victim
'
done
done
cat '"$kind-ng.without"'
(exit 1)
} &&
- diff -u '"$kind"'-expect victim
+ git diff '"$kind"'-expect victim
'
done
index d5f2cfb186110160df47a450e2f76206b85ee51b..b947ed83bb1b1d61690df1140ede337b15cb04ed 100755 (executable)
--- a/t/t4115-apply-symlink.sh
+++ b/t/t4115-apply-symlink.sh
git checkout side &&
git apply patch &&
git diff-files -p >patched &&
- diff -u patch patched
+ git diff patch patched
'
git checkout -f side &&
git apply --index patch &&
git diff-index --cached -p HEAD >patched &&
- diff -u patch patched
+ git diff patch patched
'
index aa2c869e0e7ffcfba2e4349cf5af0e2badcb5516..2685b2263017df96159542853b373ea261880ba4 100755 (executable)
--- a/t/t4116-apply-reverse.sh
+++ b/t/t4116-apply-reverse.sh
git reset --hard second &&
git apply --reverse --binary --index patch &&
git diff >diff &&
- diff -u /dev/null diff
+ git diff /dev/null diff
'
index b4de075a3e5df86fe399f9133f7437c4a8d8e26d..91931f0e3fde4874c865aa8dd44615b415d324ee 100755 (executable)
--- a/t/t4117-apply-reject.sh
+++ b/t/t4117-apply-reject.sh
exit 1
fi
- diff -u file1 saved.file1
+ git diff file1 saved.file1
'
test_expect_success 'apply without --reject should fail' '
exit 1
fi
- diff -u file1 saved.file1
+ git diff file1 saved.file1
'
test_expect_success 'apply with --reject should fail but update the file' '
exit 1
fi
- diff -u file1 expected &&
+ git diff file1 expected &&
cat file1.rej &&
echo "file1 still exists?"
exit 1
}
- diff -u file2 expected &&
+ git diff file2 expected &&
cat file2.rej &&
echo "file1 still exists?"
exit 1
}
- diff -u file2 expected &&
+ git diff file2 expected &&
cat file2.rej &&
git apply --verbose patch.1 &&
- diff -u file1 clean
+ git diff file1 clean
'
test_done
index 7309422fe520ee5f459713da85b255233c0de9a5..690a1820032025056307de8926e8f56826c29367 100755 (executable)
echo "0 1 file1" &&
echo "0 1 file2"
} >expect &&
- diff -u expect actual
+ git diff expect actual
'
cat file2.orig >file2 &&
git update-index file1 file2 &&
git apply --index diff.output &&
- diff -u file1.mods file1 &&
- diff -u file2.mods file2
+ git diff file1.mods file1 &&
+ git diff file2.mods file2
'
test_done
diff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh
index 639d45fcec2ce80a225da4d73696cea5af3a9de3..e081b32aff393c4ea6d2e12e3d69d2217d6ef378 100755 (executable)
--- a/t/t4200-rerere.sh
+++ b/t/t4200-rerere.sh
git rerere diff > out
-test_expect_success 'rerere diff' 'diff -u expect out'
+test_expect_success 'rerere diff' 'git diff expect out'
cat > expect << EOF
a1
git rerere status > out
-test_expect_success 'rerere status' 'diff -u expect out'
+test_expect_success 'rerere status' 'git diff expect out'
test_expect_success 'commit succeeds' \
"git commit -q -a -m 'prefer first over second'"
git show first:a1 | sed 's/To die: t/To die! T/' > expect
test_expect_success 'rerere kicked in' "! grep ======= a1"
-test_expect_success 'rerere prefers first change' 'diff -u a1 expect'
+test_expect_success 'rerere prefers first change' 'git diff a1 expect'
rm $rr/postimage
echo "$sha1 a1" | tr '\012' '\0' > .git/rr-cache/MERGE_RR
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
index 7d93d0d7c90de94b0972d8fa5cd6d747c3fd2f56..fc4a126407fbfd9cf630d6fca03d7392342d3e15 100755 (executable)
--- a/t/t5400-send-pack.sh
+++ b/t/t5400-send-pack.sh
cd .. &&
git-update-ref refs/heads/master master^ &&
git-send-pack --force ./victim/.git/ master &&
- ! diff -u .git/refs/heads/master victim/.git/refs/heads/master
+ ! git diff .git/refs/heads/master victim/.git/refs/heads/master
'
test_done
index 0514056ca6e8e54101b378cafd76b22a81df0ff5..460c9fd7fe1abb426a1fd977ff29214bde5bbe3e 100755 (executable)
--- a/t/t5401-update-hooks.sh
+++ b/t/t5401-update-hooks.sh
test_expect_success 'update hook arguments' '
echo refs/heads/master $commit0 $commit1 |
- diff -u - victim/.git/update.args
+ git diff - victim/.git/update.args
'
test_expect_success 'post-update hook arguments' '
echo refs/heads/master |
- diff -u - victim/.git/post-update.args
+ git diff - victim/.git/post-update.args
'
test_expect_failure 'update hook stdin is /dev/null' '
diff --git a/t/t6023-merge-file.sh b/t/t6023-merge-file.sh
index f3cd3dba4df6ac1582956a1f9d17a9818aeb694d..c76fccfb5a0811aca3bb5af67f8558745935148f 100644 (file)
--- a/t/t6023-merge-file.sh
+++ b/t/t6023-merge-file.sh
"git-merge-file test2.txt orig.txt new2.txt"
test_expect_success "merge result added missing LF" \
- "diff -u test.txt test2.txt"
+ "git diff test.txt test2.txt"
cp test.txt backup.txt
test_expect_failure "merge with conflicts" \
virga tua et baculus tuus ipsa me consolata sunt.
EOF
-test_expect_success "expected conflict markers" "diff -u test.txt expect.txt"
+test_expect_success "expected conflict markers" "git diff test.txt expect.txt"
cp backup.txt test.txt
test_expect_failure "merge with conflicts, using -L" \
EOF
test_expect_success "expected conflict markers, with -L" \
- "diff -u test.txt expect.txt"
+ "git diff test.txt expect.txt"
sed "s/ tu / TU /" < new1.txt > new5.txt
test_expect_failure "conflict in removed tail" \
>>>>>>> new5.txt
EOF
-test_expect_success "expected conflict markers" "diff -u expect out"
+test_expect_success "expected conflict markers" "git diff expect out"
test_done
index 31b96257b454c62ce84c3d883e961c41740ddddd..a398556137205d9fb561746335a13330a5aeda54 100644 (file)
>>>>>>> G:a1
EOF
-test_expect_success "result contains a conflict" "diff -u expect a1"
+test_expect_success "result contains a conflict" "git diff expect a1"
git ls-files --stage > out
cat > expect << EOF
100644 fd7923529855d0b274795ae3349c5e0438333979 3 a1
EOF
-test_expect_success "virtual trees were processed" "diff -u expect out"
+test_expect_success "virtual trees were processed" "git diff expect out"
test_done
index ea140236162894ed2e5691b57ba8c5cf98e5627d..526d7d1c4422e342c7257e260626dac3dda36a3a 100755 (executable)
--- a/t/t6200-fmt-merge-msg.sh
+++ b/t/t6200-fmt-merge-msg.sh
git fetch . left &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
- diff -u actual expected
+ git diff actual expected
'
cat >expected <<\EOF
git fetch ../trash left &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
- diff -u actual expected
+ git diff actual expected
'
cat >expected <<\EOF
git fetch . left &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
- diff -u actual expected
+ git diff actual expected
'
cat >expected <<\EOF
git fetch . left right &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
- diff -u actual expected
+ git diff actual expected
'
test_expect_success 'merge-msg test #5' '
git fetch . left right &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
- diff -u actual expected
+ git diff actual expected
'
test_done
index 7dcfc7e7db47a815606577b366f309f590896082..eb628fe07543d07812525942cba11b8133f2e000 100755 (executable)
--- a/t/t9100-git-svn-basic.sh
+++ b/t/t9100-git-svn-basic.sh
svn up '$SVN_TREE' &&
test -f '$SVN_TREE'/exec-2.sh &&
test ! -L '$SVN_TREE'/exec-2.sh &&
- diff -u help $SVN_TREE/exec-2.sh"
+ git diff help $SVN_TREE/exec-2.sh"
if test "$have_utf8" = t
then
"git-svn init $svnrepo && git-svn fetch &&
git-rev-list --pretty=raw remotes/git-svn | grep ^tree | uniq > a &&
git-rev-list --pretty=raw remotes/alt | grep ^tree | uniq > b &&
- diff -u a b"
+ git diff a b"
name='check imported tree checksums expected tree checksums'
rm -f expected
tree 8f51f74cf0163afc9ad68a4b1537288c4558b5a4
EOF
-test_expect_success "$name" "diff -u a expected"
+test_expect_success "$name" "git diff a expected"
test_expect_failure 'exit if remote refs are ambigious' "
git-config --add svn-remote.svn.fetch \
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index 970d683650f5ee6b99a07ff10063710292b28ed1..2337d83d35115ece1dc18692de4281081a267f0d 100755 (executable)
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
test_expect_success \
'A: verify commit' \
'git-cat-file commit master | sed 1d >actual &&
- diff -u expect actual'
+ git diff expect actual'
cat >expect <<EOF
100644 blob file2
test_expect_success \
'A: verify tree' \
'git-cat-file -p master^{tree} | sed "s/ [0-9a-f]* / /" >actual &&
- diff -u expect actual'
+ git diff expect actual'
echo "$file2_data" >expect
test_expect_success \
'A: verify file2' \
- 'git-cat-file blob master:file2 >actual && diff -u expect actual'
+ 'git-cat-file blob master:file2 >actual && git diff expect actual'
echo "$file3_data" >expect
test_expect_success \
'A: verify file3' \
- 'git-cat-file blob master:file3 >actual && diff -u expect actual'
+ 'git-cat-file blob master:file3 >actual && git diff expect actual'
printf "$file4_data" >expect
test_expect_success \
'A: verify file4' \
- 'git-cat-file blob master:file4 >actual && diff -u expect actual'
+ 'git-cat-file blob master:file4 >actual && git diff expect actual'
cat >expect <<EOF
:2 `git-rev-parse --verify master:file2`
EOF
test_expect_success \
'A: verify marks output' \
- 'diff -u expect marks.out'
+ 'git diff expect marks.out'
###
### series B
test_expect_success \
'C: verify commit' \
'git-cat-file commit branch | sed 1d >actual &&
- diff -u expect actual'
+ git diff expect actual'
cat >expect <<EOF
:000000 100755 0000000000000000000000000000000000000000 f1fb5da718392694d0076d677d6d0e364c79b0bc A file2/newf
test_expect_success \
'D: verify file5' \
'git-cat-file blob branch:newdir/interesting >actual &&
- diff -u expect actual'
+ git diff expect actual'
echo "$file6_data" >expect
test_expect_success \
'D: verify file6' \
'git-cat-file blob branch:newdir/exec.sh >actual &&
- diff -u expect actual'
+ git diff expect actual'
###
### series E
test_expect_success \
'E: verify commit' \
'git-cat-file commit branch | sed 1,2d >actual &&
- diff -u expect actual'
+ git diff expect actual'
###
### series F
test_expect_success \
'F: verify other commit' \
'git-cat-file commit other >actual &&
- diff -u expect actual'
+ git diff expect actual'
###
### series G
test_expect_success \
'H: verify file' \
'git-cat-file blob H:h/e/l/lo >actual &&
- diff -u expect actual'
+ git diff expect actual'
###
### series I
test_expect_success \
'I: verify edge list' \
'sed -e s/pack-.*pack/pack-.pack/ edges.list >actual &&
- diff -u expect actual'
+ git diff expect actual'
###
### series J