Get rid of the dependency to GNU diff in the tests
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)
This commit is contained in:
parent
0c725f1bd9
commit
5bd74506cd
@ -11,7 +11,7 @@ compare_diff_raw () {
|
|||||||
|
|
||||||
sed -e "$sanitize_diff_raw" <"$1" >.tmp-1
|
sed -e "$sanitize_diff_raw" <"$1" >.tmp-1
|
||||||
sed -e "$sanitize_diff_raw" <"$2" >.tmp-2
|
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#/'
|
sanitize_diff_raw_z='/^:/s/ '"$_x40"' '"$_x40"' \([A-Z]\)[0-9]*$/ X X \1#/'
|
||||||
@ -23,7 +23,7 @@ compare_diff_raw_z () {
|
|||||||
|
|
||||||
tr '\0' '\012' <"$1" | sed -e "$sanitize_diff_raw_z" >.tmp-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
|
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 () {
|
compare_diff_patch () {
|
||||||
@ -37,5 +37,5 @@ compare_diff_patch () {
|
|||||||
/^[dis]*imilarity index [0-9]*%$/d
|
/^[dis]*imilarity index [0-9]*%$/d
|
||||||
/^index [0-9a-f]*\.\.[0-9a-f]/d
|
/^index [0-9a-f]*\.\.[0-9a-f]/d
|
||||||
' <"$2" >.tmp-2
|
' <"$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
|
||||||
}
|
}
|
||||||
|
@ -131,7 +131,7 @@ _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
|
|||||||
|
|
||||||
check_result () {
|
check_result () {
|
||||||
git-ls-files --stage | sed -e 's/ '"$_x40"' / X /' >current &&
|
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
|
# This is done on an empty work directory, which is the normal
|
||||||
|
@ -33,7 +33,7 @@ compare_change () {
|
|||||||
-e '/^--- /d; /^+++ /d; /^@@ /d;' \
|
-e '/^--- /d; /^+++ /d; /^@@ /d;' \
|
||||||
-e 's/^\([-+][0-7][0-7][0-7][0-7][0-7][0-7]\) '"$_x40"' /\1 X /p' \
|
-e 's/^\([-+][0-7][0-7][0-7][0-7][0-7][0-7]\) '"$_x40"' /\1 X /p' \
|
||||||
"$1"
|
"$1"
|
||||||
diff -u expected current
|
git diff expected current
|
||||||
}
|
}
|
||||||
|
|
||||||
check_cache_at () {
|
check_cache_at () {
|
||||||
@ -86,7 +86,7 @@ test_expect_success \
|
|||||||
'rm -f .git/index &&
|
'rm -f .git/index &&
|
||||||
read_tree_twoway $treeH $treeM &&
|
read_tree_twoway $treeH $treeM &&
|
||||||
git-ls-files --stage >1-3.out &&
|
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 bozbar dirty &&
|
||||||
check_cache_at frotz dirty &&
|
check_cache_at frotz dirty &&
|
||||||
check_cache_at nitfol dirty'
|
check_cache_at nitfol dirty'
|
||||||
@ -101,7 +101,7 @@ test_expect_success \
|
|||||||
git-update-index --add yomin &&
|
git-update-index --add yomin &&
|
||||||
read_tree_twoway $treeH $treeM &&
|
read_tree_twoway $treeH $treeM &&
|
||||||
git-ls-files --stage >4.out || return 1
|
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 &&
|
compare_change 4diff.out expected &&
|
||||||
check_cache_at yomin clean'
|
check_cache_at yomin clean'
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ test_expect_success \
|
|||||||
echo yomin yomin >yomin &&
|
echo yomin yomin >yomin &&
|
||||||
read_tree_twoway $treeH $treeM &&
|
read_tree_twoway $treeH $treeM &&
|
||||||
git-ls-files --stage >5.out || return 1
|
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 &&
|
compare_change 5diff.out expected &&
|
||||||
check_cache_at yomin dirty'
|
check_cache_at yomin dirty'
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ test_expect_success \
|
|||||||
git-update-index --add frotz &&
|
git-update-index --add frotz &&
|
||||||
read_tree_twoway $treeH $treeM &&
|
read_tree_twoway $treeH $treeM &&
|
||||||
git-ls-files --stage >6.out &&
|
git-ls-files --stage >6.out &&
|
||||||
diff -u M.out 6.out &&
|
git diff M.out 6.out &&
|
||||||
check_cache_at frotz clean'
|
check_cache_at frotz clean'
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
@ -140,7 +140,7 @@ test_expect_success \
|
|||||||
echo frotz frotz >frotz &&
|
echo frotz frotz >frotz &&
|
||||||
read_tree_twoway $treeH $treeM &&
|
read_tree_twoway $treeH $treeM &&
|
||||||
git-ls-files --stage >7.out &&
|
git-ls-files --stage >7.out &&
|
||||||
diff -u M.out 7.out &&
|
git diff M.out 7.out &&
|
||||||
check_cache_at frotz dirty'
|
check_cache_at frotz dirty'
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
@ -171,7 +171,7 @@ test_expect_success \
|
|||||||
git-update-index --add rezrov &&
|
git-update-index --add rezrov &&
|
||||||
read_tree_twoway $treeH $treeM &&
|
read_tree_twoway $treeH $treeM &&
|
||||||
git-ls-files --stage >10.out &&
|
git-ls-files --stage >10.out &&
|
||||||
diff -u M.out 10.out'
|
git diff M.out 10.out'
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
'11 - dirty path removed.' \
|
'11 - dirty path removed.' \
|
||||||
@ -216,7 +216,7 @@ test_expect_success \
|
|||||||
git-update-index --add nitfol &&
|
git-update-index --add nitfol &&
|
||||||
read_tree_twoway $treeH $treeM &&
|
read_tree_twoway $treeH $treeM &&
|
||||||
git-ls-files --stage >14.out || return 1
|
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 &&
|
compare_change 14diff.out expected &&
|
||||||
check_cache_at nitfol clean'
|
check_cache_at nitfol clean'
|
||||||
|
|
||||||
@ -230,7 +230,7 @@ test_expect_success \
|
|||||||
echo nitfol nitfol nitfol >nitfol &&
|
echo nitfol nitfol nitfol >nitfol &&
|
||||||
read_tree_twoway $treeH $treeM &&
|
read_tree_twoway $treeH $treeM &&
|
||||||
git-ls-files --stage >15.out || return 1
|
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 &&
|
compare_change 15diff.out expected &&
|
||||||
check_cache_at nitfol dirty'
|
check_cache_at nitfol dirty'
|
||||||
|
|
||||||
@ -262,7 +262,7 @@ test_expect_success \
|
|||||||
git-update-index --add bozbar &&
|
git-update-index --add bozbar &&
|
||||||
read_tree_twoway $treeH $treeM &&
|
read_tree_twoway $treeH $treeM &&
|
||||||
git-ls-files --stage >18.out &&
|
git-ls-files --stage >18.out &&
|
||||||
diff -u M.out 18.out &&
|
git diff M.out 18.out &&
|
||||||
check_cache_at bozbar clean'
|
check_cache_at bozbar clean'
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
@ -275,7 +275,7 @@ test_expect_success \
|
|||||||
echo gnusto gnusto >bozbar &&
|
echo gnusto gnusto >bozbar &&
|
||||||
read_tree_twoway $treeH $treeM &&
|
read_tree_twoway $treeH $treeM &&
|
||||||
git-ls-files --stage >19.out &&
|
git-ls-files --stage >19.out &&
|
||||||
diff -u M.out 19.out &&
|
git diff M.out 19.out &&
|
||||||
check_cache_at bozbar dirty'
|
check_cache_at bozbar dirty'
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
@ -287,7 +287,7 @@ test_expect_success \
|
|||||||
git-update-index --add bozbar &&
|
git-update-index --add bozbar &&
|
||||||
read_tree_twoway $treeH $treeM &&
|
read_tree_twoway $treeH $treeM &&
|
||||||
git-ls-files --stage >20.out &&
|
git-ls-files --stage >20.out &&
|
||||||
diff -u M.out 20.out &&
|
git diff M.out 20.out &&
|
||||||
check_cache_at bozbar dirty'
|
check_cache_at bozbar dirty'
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
@ -337,7 +337,7 @@ test_expect_success \
|
|||||||
git-update-index --add DF &&
|
git-update-index --add DF &&
|
||||||
read_tree_twoway $treeDF $treeDFDF &&
|
read_tree_twoway $treeDF $treeDFDF &&
|
||||||
git-ls-files --stage >DFDFcheck.out &&
|
git-ls-files --stage >DFDFcheck.out &&
|
||||||
diff -u DFDF.out DFDFcheck.out &&
|
git diff DFDF.out DFDFcheck.out &&
|
||||||
check_cache_at DF/DF dirty &&
|
check_cache_at DF/DF dirty &&
|
||||||
:'
|
:'
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ compare_change () {
|
|||||||
sed >current \
|
sed >current \
|
||||||
-e '/^--- /d; /^+++ /d; /^@@ /d;' \
|
-e '/^--- /d; /^+++ /d; /^@@ /d;' \
|
||||||
-e 's/^\(.[0-7][0-7][0-7][0-7][0-7][0-7]\) '"$_x40"' /\1 X /' "$1"
|
-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 () {
|
check_cache_at () {
|
||||||
|
@ -368,12 +368,12 @@ cat > expect << EOF
|
|||||||
weird
|
weird
|
||||||
EOF
|
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" \
|
test_expect_failure "rename non-existing section" \
|
||||||
'git-config --rename-section branch."world domination" branch.drei'
|
'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" \
|
test_expect_success "rename another section" \
|
||||||
'git-config --rename-section branch."1 234 blabl/a" branch.drei'
|
'git-config --rename-section branch."1 234 blabl/a" branch.drei'
|
||||||
@ -389,7 +389,7 @@ cat > expect << EOF
|
|||||||
weird
|
weird
|
||||||
EOF
|
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 '
|
test_expect_success numbers '
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ test_expect_success \
|
|||||||
--exclude-per-directory=.gitignore \
|
--exclude-per-directory=.gitignore \
|
||||||
--exclude-from=.git/ignore \
|
--exclude-from=.git/ignore \
|
||||||
>output &&
|
>output &&
|
||||||
diff -u expect output'
|
git diff expect output'
|
||||||
|
|
||||||
# Test \r\n (MSDOS-like systems)
|
# Test \r\n (MSDOS-like systems)
|
||||||
printf '*.1\r\n/*.3\r\n!*.6\r\n' >.gitignore
|
printf '*.1\r\n/*.3\r\n!*.6\r\n' >.gitignore
|
||||||
@ -77,6 +77,6 @@ test_expect_success \
|
|||||||
--exclude-per-directory=.gitignore \
|
--exclude-per-directory=.gitignore \
|
||||||
--exclude-from=.git/ignore \
|
--exclude-from=.git/ignore \
|
||||||
>output &&
|
>output &&
|
||||||
diff -u expect output'
|
git diff expect output'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
@ -23,7 +23,7 @@ test_expect_success \
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'git-ls-files without path restriction.' \
|
'git-ls-files without path restriction.' \
|
||||||
'git-ls-files --others >output &&
|
'git-ls-files --others >output &&
|
||||||
diff -u output - <<EOF
|
git diff output - <<EOF
|
||||||
--
|
--
|
||||||
-foo
|
-foo
|
||||||
output
|
output
|
||||||
@ -34,7 +34,7 @@ EOF
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'git-ls-files with path restriction.' \
|
'git-ls-files with path restriction.' \
|
||||||
'git-ls-files --others path0 >output &&
|
'git-ls-files --others path0 >output &&
|
||||||
diff -u output - <<EOF
|
git diff output - <<EOF
|
||||||
path0
|
path0
|
||||||
EOF
|
EOF
|
||||||
'
|
'
|
||||||
@ -42,7 +42,7 @@ EOF
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'git-ls-files with path restriction with --.' \
|
'git-ls-files with path restriction with --.' \
|
||||||
'git-ls-files --others -- path0 >output &&
|
'git-ls-files --others -- path0 >output &&
|
||||||
diff -u output - <<EOF
|
git diff output - <<EOF
|
||||||
path0
|
path0
|
||||||
EOF
|
EOF
|
||||||
'
|
'
|
||||||
@ -50,7 +50,7 @@ EOF
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'git-ls-files with path restriction with -- --.' \
|
'git-ls-files with path restriction with -- --.' \
|
||||||
'git-ls-files --others -- -- >output &&
|
'git-ls-files --others -- -- >output &&
|
||||||
diff -u output - <<EOF
|
git diff output - <<EOF
|
||||||
--
|
--
|
||||||
EOF
|
EOF
|
||||||
'
|
'
|
||||||
@ -58,7 +58,7 @@ EOF
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'git-ls-files with no path restriction.' \
|
'git-ls-files with no path restriction.' \
|
||||||
'git-ls-files --others -- >output &&
|
'git-ls-files --others -- >output &&
|
||||||
diff -u output - <<EOF
|
git diff output - <<EOF
|
||||||
--
|
--
|
||||||
-foo
|
-foo
|
||||||
output
|
output
|
||||||
|
@ -35,7 +35,7 @@ _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
|
|||||||
_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
|
_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
|
||||||
test_output () {
|
test_output () {
|
||||||
sed -e "s/ $_x40 / X /" <current >check
|
sed -e "s/ $_x40 / X /" <current >check
|
||||||
diff -u expected check
|
git diff expected check
|
||||||
}
|
}
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
|
@ -43,7 +43,7 @@ _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
|
|||||||
_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
|
_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
|
||||||
test_output () {
|
test_output () {
|
||||||
sed -e "s/ $_x40 / X /" <current >check
|
sed -e "s/ $_x40 / X /" <current >check
|
||||||
diff -u expected check
|
git diff expected check
|
||||||
}
|
}
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
|
@ -35,7 +35,7 @@ no-funny' >expected
|
|||||||
test_expect_success 'git-ls-files no-funny' \
|
test_expect_success 'git-ls-files no-funny' \
|
||||||
'git-update-index --add "$p0" "$p2" &&
|
'git-update-index --add "$p0" "$p2" &&
|
||||||
git-ls-files >current &&
|
git-ls-files >current &&
|
||||||
diff -u expected current'
|
git diff expected current'
|
||||||
|
|
||||||
t0=`git-write-tree`
|
t0=`git-write-tree`
|
||||||
echo "$t0" >t0
|
echo "$t0" >t0
|
||||||
@ -48,14 +48,14 @@ EOF
|
|||||||
test_expect_success 'git-ls-files with-funny' \
|
test_expect_success 'git-ls-files with-funny' \
|
||||||
'git-update-index --add "$p1" &&
|
'git-update-index --add "$p1" &&
|
||||||
git-ls-files >current &&
|
git-ls-files >current &&
|
||||||
diff -u expected current'
|
git diff expected current'
|
||||||
|
|
||||||
echo 'just space
|
echo 'just space
|
||||||
no-funny
|
no-funny
|
||||||
tabs ," (dq) and spaces' >expected
|
tabs ," (dq) and spaces' >expected
|
||||||
test_expect_success 'git-ls-files -z with-funny' \
|
test_expect_success 'git-ls-files -z with-funny' \
|
||||||
'git-ls-files -z | tr \\0 \\012 >current &&
|
'git-ls-files -z | tr \\0 \\012 >current &&
|
||||||
diff -u expected current'
|
git diff expected current'
|
||||||
|
|
||||||
t1=`git-write-tree`
|
t1=`git-write-tree`
|
||||||
echo "$t1" >t1
|
echo "$t1" >t1
|
||||||
@ -67,28 +67,28 @@ no-funny
|
|||||||
EOF
|
EOF
|
||||||
test_expect_success 'git-ls-tree with funny' \
|
test_expect_success 'git-ls-tree with funny' \
|
||||||
'git-ls-tree -r $t1 | sed -e "s/^[^ ]* //" >current &&
|
'git-ls-tree -r $t1 | sed -e "s/^[^ ]* //" >current &&
|
||||||
diff -u expected current'
|
git diff expected current'
|
||||||
|
|
||||||
cat > expected <<\EOF
|
cat > expected <<\EOF
|
||||||
A "tabs\t,\" (dq) and spaces"
|
A "tabs\t,\" (dq) and spaces"
|
||||||
EOF
|
EOF
|
||||||
test_expect_success 'git-diff-index with-funny' \
|
test_expect_success 'git-diff-index with-funny' \
|
||||||
'git-diff-index --name-status $t0 >current &&
|
'git-diff-index --name-status $t0 >current &&
|
||||||
diff -u expected current'
|
git diff expected current'
|
||||||
|
|
||||||
test_expect_success 'git-diff-tree with-funny' \
|
test_expect_success 'git-diff-tree with-funny' \
|
||||||
'git-diff-tree --name-status $t0 $t1 >current &&
|
'git-diff-tree --name-status $t0 $t1 >current &&
|
||||||
diff -u expected current'
|
git diff expected current'
|
||||||
|
|
||||||
echo 'A
|
echo 'A
|
||||||
tabs ," (dq) and spaces' >expected
|
tabs ," (dq) and spaces' >expected
|
||||||
test_expect_success 'git-diff-index -z with-funny' \
|
test_expect_success 'git-diff-index -z with-funny' \
|
||||||
'git-diff-index -z --name-status $t0 | tr \\0 \\012 >current &&
|
'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' \
|
test_expect_success 'git-diff-tree -z with-funny' \
|
||||||
'git-diff-tree -z --name-status $t0 $t1 | tr \\0 \\012 >current &&
|
'git-diff-tree -z --name-status $t0 $t1 | tr \\0 \\012 >current &&
|
||||||
diff -u expected current'
|
git diff expected current'
|
||||||
|
|
||||||
cat > expected <<\EOF
|
cat > expected <<\EOF
|
||||||
CNUM no-funny "tabs\t,\" (dq) and spaces"
|
CNUM no-funny "tabs\t,\" (dq) and spaces"
|
||||||
@ -96,7 +96,7 @@ EOF
|
|||||||
test_expect_success 'git-diff-tree -C with-funny' \
|
test_expect_success 'git-diff-tree -C with-funny' \
|
||||||
'git-diff-tree -C --find-copies-harder --name-status \
|
'git-diff-tree -C --find-copies-harder --name-status \
|
||||||
$t0 $t1 | sed -e 's/^C[0-9]*/CNUM/' >current &&
|
$t0 $t1 | sed -e 's/^C[0-9]*/CNUM/' >current &&
|
||||||
diff -u expected current'
|
git diff expected current'
|
||||||
|
|
||||||
cat > expected <<\EOF
|
cat > expected <<\EOF
|
||||||
RNUM no-funny "tabs\t,\" (dq) and spaces"
|
RNUM no-funny "tabs\t,\" (dq) and spaces"
|
||||||
@ -105,7 +105,7 @@ test_expect_success 'git-diff-tree delete with-funny' \
|
|||||||
'git-update-index --force-remove "$p0" &&
|
'git-update-index --force-remove "$p0" &&
|
||||||
git-diff-index -M --name-status \
|
git-diff-index -M --name-status \
|
||||||
$t0 | sed -e 's/^R[0-9]*/RNUM/' >current &&
|
$t0 | sed -e 's/^R[0-9]*/RNUM/' >current &&
|
||||||
diff -u expected current'
|
git diff expected current'
|
||||||
|
|
||||||
cat > expected <<\EOF
|
cat > expected <<\EOF
|
||||||
diff --git a/no-funny "b/tabs\t,\" (dq) and spaces"
|
diff --git a/no-funny "b/tabs\t,\" (dq) and spaces"
|
||||||
@ -116,7 +116,7 @@ EOF
|
|||||||
test_expect_success 'git-diff-tree delete with-funny' \
|
test_expect_success 'git-diff-tree delete with-funny' \
|
||||||
'git-diff-index -M -p $t0 |
|
'git-diff-index -M -p $t0 |
|
||||||
sed -e "s/index [0-9]*%/index NUM%/" >current &&
|
sed -e "s/index [0-9]*%/index NUM%/" >current &&
|
||||||
diff -u expected current'
|
git diff expected current'
|
||||||
|
|
||||||
chmod +x "$p1"
|
chmod +x "$p1"
|
||||||
cat > expected <<\EOF
|
cat > expected <<\EOF
|
||||||
@ -130,7 +130,7 @@ EOF
|
|||||||
test_expect_success 'git-diff-tree delete with-funny' \
|
test_expect_success 'git-diff-tree delete with-funny' \
|
||||||
'git-diff-index -M -p $t0 |
|
'git-diff-index -M -p $t0 |
|
||||||
sed -e "s/index [0-9]*%/index NUM%/" >current &&
|
sed -e "s/index [0-9]*%/index NUM%/" >current &&
|
||||||
diff -u expected current'
|
git diff expected current'
|
||||||
|
|
||||||
cat >expected <<\EOF
|
cat >expected <<\EOF
|
||||||
"tabs\t,\" (dq) and spaces"
|
"tabs\t,\" (dq) and spaces"
|
||||||
@ -139,7 +139,7 @@ EOF
|
|||||||
test_expect_success 'git-diff-tree rename with-funny applied' \
|
test_expect_success 'git-diff-tree rename with-funny applied' \
|
||||||
'git-diff-index -M -p $t0 |
|
'git-diff-index -M -p $t0 |
|
||||||
git-apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
|
git-apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
|
||||||
diff -u expected current'
|
git diff expected current'
|
||||||
|
|
||||||
cat > expected <<\EOF
|
cat > expected <<\EOF
|
||||||
no-funny
|
no-funny
|
||||||
@ -149,12 +149,12 @@ EOF
|
|||||||
test_expect_success 'git-diff-tree delete with-funny applied' \
|
test_expect_success 'git-diff-tree delete with-funny applied' \
|
||||||
'git-diff-index -p $t0 |
|
'git-diff-index -p $t0 |
|
||||||
git-apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
|
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' \
|
test_expect_success 'git-apply non-git diff' \
|
||||||
'git-diff-index -p $t0 |
|
'git-diff-index -p $t0 |
|
||||||
sed -ne "/^[-+@]/p" |
|
sed -ne "/^[-+@]/p" |
|
||||||
git-apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
|
git-apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
|
||||||
diff -u expected current'
|
git diff expected current'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
@ -9,7 +9,7 @@ test_description='commit and log output encodings'
|
|||||||
|
|
||||||
compare_with () {
|
compare_with () {
|
||||||
git-show -s $1 | sed -e '1,/^$/d' -e 's/^ //' -e '$d' >current &&
|
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 '
|
test_expect_success setup '
|
||||||
|
@ -38,7 +38,7 @@ echo ":100644 100755 X X M rezrov" >expected
|
|||||||
|
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
'verify' \
|
'verify' \
|
||||||
'diff -u expected check'
|
'git diff expected check'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ do
|
|||||||
} >"$actual" &&
|
} >"$actual" &&
|
||||||
if test -f "$expect"
|
if test -f "$expect"
|
||||||
then
|
then
|
||||||
diff -u "$expect" "$actual" &&
|
git diff "$expect" "$actual" &&
|
||||||
rm -f "$actual"
|
rm -f "$actual"
|
||||||
else
|
else
|
||||||
# this is to help developing new tests.
|
# this is to help developing new tests.
|
||||||
|
@ -43,13 +43,13 @@ index adf3937..6edc172 100644
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
git-diff > out
|
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
|
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
|
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
|
tr 'Q' '\015' << EOF > x
|
||||||
whitespace at beginning
|
whitespace at beginning
|
||||||
@ -90,14 +90,14 @@ index d99af23..8b32fb5 100644
|
|||||||
+CR at end
|
+CR at end
|
||||||
EOF
|
EOF
|
||||||
git-diff > out
|
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
|
cat << EOF > expect
|
||||||
diff --git a/x b/x
|
diff --git a/x b/x
|
||||||
index d99af23..8b32fb5 100644
|
index d99af23..8b32fb5 100644
|
||||||
EOF
|
EOF
|
||||||
git-diff -w > out
|
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
|
tr 'Q' '\015' << EOF > expect
|
||||||
diff --git a/x b/x
|
diff --git a/x b/x
|
||||||
@ -115,6 +115,6 @@ index d99af23..8b32fb5 100644
|
|||||||
CR at endQ
|
CR at endQ
|
||||||
EOF
|
EOF
|
||||||
git-diff -b > out
|
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
|
test_done
|
||||||
|
@ -49,7 +49,7 @@ cat >expect <<\EOF
|
|||||||
EOF
|
EOF
|
||||||
test_expect_success 'git diff --summary -M HEAD' '
|
test_expect_success 'git diff --summary -M HEAD' '
|
||||||
git diff --summary -M HEAD >actual &&
|
git diff --summary -M HEAD >actual &&
|
||||||
diff -u expect actual
|
git diff expect actual
|
||||||
'
|
'
|
||||||
|
|
||||||
cat >expect <<\EOF
|
cat >expect <<\EOF
|
||||||
@ -64,7 +64,7 @@ cat >expect <<\EOF
|
|||||||
EOF
|
EOF
|
||||||
test_expect_success 'git diff --stat -M HEAD' '
|
test_expect_success 'git diff --stat -M HEAD' '
|
||||||
git diff --stat -M HEAD >actual &&
|
git diff --stat -M HEAD >actual &&
|
||||||
diff -u expect actual
|
git diff expect actual
|
||||||
'
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
@ -11,37 +11,37 @@ test_description='git-apply --stat --summary test.
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'rename' \
|
'rename' \
|
||||||
'git-apply --stat --summary <../t4100/t-apply-1.patch >current &&
|
'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 \
|
test_expect_success \
|
||||||
'copy' \
|
'copy' \
|
||||||
'git-apply --stat --summary <../t4100/t-apply-2.patch >current &&
|
'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 \
|
test_expect_success \
|
||||||
'rewrite' \
|
'rewrite' \
|
||||||
'git-apply --stat --summary <../t4100/t-apply-3.patch >current &&
|
'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 \
|
test_expect_success \
|
||||||
'mode' \
|
'mode' \
|
||||||
'git-apply --stat --summary <../t4100/t-apply-4.patch >current &&
|
'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 \
|
test_expect_success \
|
||||||
'non git' \
|
'non git' \
|
||||||
'git-apply --stat --summary <../t4100/t-apply-5.patch >current &&
|
'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 \
|
test_expect_success \
|
||||||
'non git' \
|
'non git' \
|
||||||
'git-apply --stat --summary <../t4100/t-apply-6.patch >current &&
|
'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 \
|
test_expect_success \
|
||||||
'non git' \
|
'non git' \
|
||||||
'git-apply --stat --summary <../t4100/t-apply-7.patch >current &&
|
'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
|
test_done
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ do
|
|||||||
cat '"$kind-patch.$with"'
|
cat '"$kind-patch.$with"'
|
||||||
(exit 1)
|
(exit 1)
|
||||||
} &&
|
} &&
|
||||||
diff -u '"$kind"'-expect victim
|
git diff '"$kind"'-expect victim
|
||||||
'
|
'
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
@ -108,7 +108,7 @@ do
|
|||||||
cat '"$kind-ng.without"'
|
cat '"$kind-ng.without"'
|
||||||
(exit 1)
|
(exit 1)
|
||||||
} &&
|
} &&
|
||||||
diff -u '"$kind"'-expect victim
|
git diff '"$kind"'-expect victim
|
||||||
'
|
'
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ test_expect_success 'apply symlink patch' '
|
|||||||
git checkout side &&
|
git checkout side &&
|
||||||
git apply patch &&
|
git apply patch &&
|
||||||
git diff-files -p >patched &&
|
git diff-files -p >patched &&
|
||||||
diff -u patch patched
|
git diff patch patched
|
||||||
|
|
||||||
'
|
'
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ test_expect_success 'apply --index symlink patch' '
|
|||||||
git checkout -f side &&
|
git checkout -f side &&
|
||||||
git apply --index patch &&
|
git apply --index patch &&
|
||||||
git diff-index --cached -p HEAD >patched &&
|
git diff-index --cached -p HEAD >patched &&
|
||||||
diff -u patch patched
|
git diff patch patched
|
||||||
|
|
||||||
'
|
'
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ test_expect_success 'apply in reverse' '
|
|||||||
git reset --hard second &&
|
git reset --hard second &&
|
||||||
git apply --reverse --binary --index patch &&
|
git apply --reverse --binary --index patch &&
|
||||||
git diff >diff &&
|
git diff >diff &&
|
||||||
diff -u /dev/null diff
|
git diff /dev/null diff
|
||||||
|
|
||||||
'
|
'
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ test_expect_success 'apply without --reject should fail' '
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
diff -u file1 saved.file1
|
git diff file1 saved.file1
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'apply without --reject should fail' '
|
test_expect_success 'apply without --reject should fail' '
|
||||||
@ -65,7 +65,7 @@ test_expect_success 'apply without --reject should fail' '
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
diff -u file1 saved.file1
|
git diff file1 saved.file1
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'apply with --reject should fail but update the file' '
|
test_expect_success 'apply with --reject should fail but update the file' '
|
||||||
@ -79,7 +79,7 @@ test_expect_success 'apply with --reject should fail but update the file' '
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
diff -u file1 expected &&
|
git diff file1 expected &&
|
||||||
|
|
||||||
cat file1.rej &&
|
cat file1.rej &&
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ test_expect_success 'apply with --reject should fail but update the file' '
|
|||||||
echo "file1 still exists?"
|
echo "file1 still exists?"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
diff -u file2 expected &&
|
git diff file2 expected &&
|
||||||
|
|
||||||
cat file2.rej &&
|
cat file2.rej &&
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ test_expect_success 'the same test with --verbose' '
|
|||||||
echo "file1 still exists?"
|
echo "file1 still exists?"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
diff -u file2 expected &&
|
git diff file2 expected &&
|
||||||
|
|
||||||
cat file2.rej &&
|
cat file2.rej &&
|
||||||
|
|
||||||
@ -151,7 +151,7 @@ test_expect_success 'apply cleanly with --verbose' '
|
|||||||
|
|
||||||
git apply --verbose patch.1 &&
|
git apply --verbose patch.1 &&
|
||||||
|
|
||||||
diff -u file1 clean
|
git diff file1 clean
|
||||||
'
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
@ -37,7 +37,7 @@ test_expect_success 'apply --numstat' '
|
|||||||
echo "0 1 file1" &&
|
echo "0 1 file1" &&
|
||||||
echo "0 1 file2"
|
echo "0 1 file2"
|
||||||
} >expect &&
|
} >expect &&
|
||||||
diff -u expect actual
|
git diff expect actual
|
||||||
|
|
||||||
'
|
'
|
||||||
|
|
||||||
@ -47,8 +47,8 @@ test_expect_success 'apply --apply' '
|
|||||||
cat file2.orig >file2 &&
|
cat file2.orig >file2 &&
|
||||||
git update-index file1 file2 &&
|
git update-index file1 file2 &&
|
||||||
git apply --index diff.output &&
|
git apply --index diff.output &&
|
||||||
diff -u file1.mods file1 &&
|
git diff file1.mods file1 &&
|
||||||
diff -u file2.mods file2
|
git diff file2.mods file2
|
||||||
'
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
@ -70,7 +70,7 @@ EOF
|
|||||||
|
|
||||||
git rerere diff > out
|
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
|
cat > expect << EOF
|
||||||
a1
|
a1
|
||||||
@ -78,7 +78,7 @@ EOF
|
|||||||
|
|
||||||
git rerere status > out
|
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' \
|
test_expect_success 'commit succeeds' \
|
||||||
"git commit -q -a -m 'prefer first over second'"
|
"git commit -q -a -m 'prefer first over second'"
|
||||||
@ -94,7 +94,7 @@ test_expect_failure 'another conflicting merge' 'git pull . first'
|
|||||||
git show first:a1 | sed 's/To die: t/To die! T/' > expect
|
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 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
|
rm $rr/postimage
|
||||||
echo "$sha1 a1" | tr '\012' '\0' > .git/rr-cache/MERGE_RR
|
echo "$sha1 a1" | tr '\012' '\0' > .git/rr-cache/MERGE_RR
|
||||||
|
@ -110,7 +110,7 @@ test_expect_success \
|
|||||||
cd .. &&
|
cd .. &&
|
||||||
git-update-ref refs/heads/master master^ &&
|
git-update-ref refs/heads/master master^ &&
|
||||||
git-send-pack --force ./victim/.git/ 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
|
test_done
|
||||||
|
@ -51,12 +51,12 @@ test_expect_success 'hooks ran' '
|
|||||||
|
|
||||||
test_expect_success 'update hook arguments' '
|
test_expect_success 'update hook arguments' '
|
||||||
echo refs/heads/master $commit0 $commit1 |
|
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' '
|
test_expect_success 'post-update hook arguments' '
|
||||||
echo refs/heads/master |
|
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' '
|
test_expect_failure 'update hook stdin is /dev/null' '
|
||||||
|
@ -63,7 +63,7 @@ test_expect_success "merge without conflict (missing LF at EOF)" \
|
|||||||
"git-merge-file test2.txt orig.txt new2.txt"
|
"git-merge-file test2.txt orig.txt new2.txt"
|
||||||
|
|
||||||
test_expect_success "merge result added missing LF" \
|
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
|
cp test.txt backup.txt
|
||||||
test_expect_failure "merge with conflicts" \
|
test_expect_failure "merge with conflicts" \
|
||||||
@ -86,7 +86,7 @@ non timebo mala, quoniam tu mecum es:
|
|||||||
virga tua et baculus tuus ipsa me consolata sunt.
|
virga tua et baculus tuus ipsa me consolata sunt.
|
||||||
EOF
|
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
|
cp backup.txt test.txt
|
||||||
test_expect_failure "merge with conflicts, using -L" \
|
test_expect_failure "merge with conflicts, using -L" \
|
||||||
@ -110,7 +110,7 @@ virga tua et baculus tuus ipsa me consolata sunt.
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
test_expect_success "expected conflict markers, with -L" \
|
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
|
sed "s/ tu / TU /" < new1.txt > new5.txt
|
||||||
test_expect_failure "conflict in removed tail" \
|
test_expect_failure "conflict in removed tail" \
|
||||||
@ -132,7 +132,7 @@ virga tua et baculus tuus ipsa me consolata sunt.
|
|||||||
>>>>>>> new5.txt
|
>>>>>>> new5.txt
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
test_expect_success "expected conflict markers" "diff -u expect out"
|
test_expect_success "expected conflict markers" "git diff expect out"
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ G
|
|||||||
>>>>>>> G:a1
|
>>>>>>> G:a1
|
||||||
EOF
|
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
|
git ls-files --stage > out
|
||||||
cat > expect << EOF
|
cat > expect << EOF
|
||||||
@ -79,6 +79,6 @@ cat > expect << EOF
|
|||||||
100644 fd7923529855d0b274795ae3349c5e0438333979 3 a1
|
100644 fd7923529855d0b274795ae3349c5e0438333979 3 a1
|
||||||
EOF
|
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
|
test_done
|
||||||
|
@ -79,7 +79,7 @@ test_expect_success 'merge-msg test #1' '
|
|||||||
git fetch . left &&
|
git fetch . left &&
|
||||||
|
|
||||||
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
|
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
|
||||||
diff -u actual expected
|
git diff actual expected
|
||||||
'
|
'
|
||||||
|
|
||||||
cat >expected <<\EOF
|
cat >expected <<\EOF
|
||||||
@ -92,7 +92,7 @@ test_expect_success 'merge-msg test #2' '
|
|||||||
git fetch ../trash left &&
|
git fetch ../trash left &&
|
||||||
|
|
||||||
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
|
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
|
||||||
diff -u actual expected
|
git diff actual expected
|
||||||
'
|
'
|
||||||
|
|
||||||
cat >expected <<\EOF
|
cat >expected <<\EOF
|
||||||
@ -115,7 +115,7 @@ test_expect_success 'merge-msg test #3' '
|
|||||||
git fetch . left &&
|
git fetch . left &&
|
||||||
|
|
||||||
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
|
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
|
||||||
diff -u actual expected
|
git diff actual expected
|
||||||
'
|
'
|
||||||
|
|
||||||
cat >expected <<\EOF
|
cat >expected <<\EOF
|
||||||
@ -145,7 +145,7 @@ test_expect_success 'merge-msg test #4' '
|
|||||||
git fetch . left right &&
|
git fetch . left right &&
|
||||||
|
|
||||||
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
|
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
|
||||||
diff -u actual expected
|
git diff actual expected
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'merge-msg test #5' '
|
test_expect_success 'merge-msg test #5' '
|
||||||
@ -157,7 +157,7 @@ test_expect_success 'merge-msg test #5' '
|
|||||||
git fetch . left right &&
|
git fetch . left right &&
|
||||||
|
|
||||||
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
|
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
|
||||||
diff -u actual expected
|
git diff actual expected
|
||||||
'
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
@ -169,7 +169,7 @@ test_expect_success "$name" "
|
|||||||
svn up '$SVN_TREE' &&
|
svn up '$SVN_TREE' &&
|
||||||
test -f '$SVN_TREE'/exec-2.sh &&
|
test -f '$SVN_TREE'/exec-2.sh &&
|
||||||
test ! -L '$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
|
if test "$have_utf8" = t
|
||||||
then
|
then
|
||||||
@ -193,7 +193,7 @@ test_expect_success "$name" \
|
|||||||
"git-svn init $svnrepo && git-svn fetch &&
|
"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/git-svn | grep ^tree | uniq > a &&
|
||||||
git-rev-list --pretty=raw remotes/alt | grep ^tree | uniq > b &&
|
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'
|
name='check imported tree checksums expected tree checksums'
|
||||||
rm -f expected
|
rm -f expected
|
||||||
@ -211,7 +211,7 @@ tree d667270a1f7b109f5eb3aaea21ede14b56bfdd6e
|
|||||||
tree 8f51f74cf0163afc9ad68a4b1537288c4558b5a4
|
tree 8f51f74cf0163afc9ad68a4b1537288c4558b5a4
|
||||||
EOF
|
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' "
|
test_expect_failure 'exit if remote refs are ambigious' "
|
||||||
git-config --add svn-remote.svn.fetch \
|
git-config --add svn-remote.svn.fetch \
|
||||||
|
@ -74,7 +74,7 @@ EOF
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'A: verify commit' \
|
'A: verify commit' \
|
||||||
'git-cat-file commit master | sed 1d >actual &&
|
'git-cat-file commit master | sed 1d >actual &&
|
||||||
diff -u expect actual'
|
git diff expect actual'
|
||||||
|
|
||||||
cat >expect <<EOF
|
cat >expect <<EOF
|
||||||
100644 blob file2
|
100644 blob file2
|
||||||
@ -84,22 +84,22 @@ EOF
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'A: verify tree' \
|
'A: verify tree' \
|
||||||
'git-cat-file -p master^{tree} | sed "s/ [0-9a-f]* / /" >actual &&
|
'git-cat-file -p master^{tree} | sed "s/ [0-9a-f]* / /" >actual &&
|
||||||
diff -u expect actual'
|
git diff expect actual'
|
||||||
|
|
||||||
echo "$file2_data" >expect
|
echo "$file2_data" >expect
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
'A: verify file2' \
|
'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
|
echo "$file3_data" >expect
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
'A: verify file3' \
|
'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
|
printf "$file4_data" >expect
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
'A: verify file4' \
|
'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
|
cat >expect <<EOF
|
||||||
:2 `git-rev-parse --verify master:file2`
|
:2 `git-rev-parse --verify master:file2`
|
||||||
@ -109,7 +109,7 @@ cat >expect <<EOF
|
|||||||
EOF
|
EOF
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
'A: verify marks output' \
|
'A: verify marks output' \
|
||||||
'diff -u expect marks.out'
|
'git diff expect marks.out'
|
||||||
|
|
||||||
###
|
###
|
||||||
### series B
|
### series B
|
||||||
@ -175,7 +175,7 @@ EOF
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'C: verify commit' \
|
'C: verify commit' \
|
||||||
'git-cat-file commit branch | sed 1d >actual &&
|
'git-cat-file commit branch | sed 1d >actual &&
|
||||||
diff -u expect actual'
|
git diff expect actual'
|
||||||
|
|
||||||
cat >expect <<EOF
|
cat >expect <<EOF
|
||||||
:000000 100755 0000000000000000000000000000000000000000 f1fb5da718392694d0076d677d6d0e364c79b0bc A file2/newf
|
:000000 100755 0000000000000000000000000000000000000000 f1fb5da718392694d0076d677d6d0e364c79b0bc A file2/newf
|
||||||
@ -232,13 +232,13 @@ echo "$file5_data" >expect
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'D: verify file5' \
|
'D: verify file5' \
|
||||||
'git-cat-file blob branch:newdir/interesting >actual &&
|
'git-cat-file blob branch:newdir/interesting >actual &&
|
||||||
diff -u expect actual'
|
git diff expect actual'
|
||||||
|
|
||||||
echo "$file6_data" >expect
|
echo "$file6_data" >expect
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
'D: verify file6' \
|
'D: verify file6' \
|
||||||
'git-cat-file blob branch:newdir/exec.sh >actual &&
|
'git-cat-file blob branch:newdir/exec.sh >actual &&
|
||||||
diff -u expect actual'
|
git diff expect actual'
|
||||||
|
|
||||||
###
|
###
|
||||||
### series E
|
### series E
|
||||||
@ -274,7 +274,7 @@ EOF
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'E: verify commit' \
|
'E: verify commit' \
|
||||||
'git-cat-file commit branch | sed 1,2d >actual &&
|
'git-cat-file commit branch | sed 1,2d >actual &&
|
||||||
diff -u expect actual'
|
git diff expect actual'
|
||||||
|
|
||||||
###
|
###
|
||||||
### series F
|
### series F
|
||||||
@ -327,7 +327,7 @@ EOF
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'F: verify other commit' \
|
'F: verify other commit' \
|
||||||
'git-cat-file commit other >actual &&
|
'git-cat-file commit other >actual &&
|
||||||
diff -u expect actual'
|
git diff expect actual'
|
||||||
|
|
||||||
###
|
###
|
||||||
### series G
|
### series G
|
||||||
@ -405,7 +405,7 @@ echo "$file5_data" >expect
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'H: verify file' \
|
'H: verify file' \
|
||||||
'git-cat-file blob H:h/e/l/lo >actual &&
|
'git-cat-file blob H:h/e/l/lo >actual &&
|
||||||
diff -u expect actual'
|
git diff expect actual'
|
||||||
|
|
||||||
###
|
###
|
||||||
### series I
|
### series I
|
||||||
@ -431,7 +431,7 @@ EOF
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'I: verify edge list' \
|
'I: verify edge list' \
|
||||||
'sed -e s/pack-.*pack/pack-.pack/ edges.list >actual &&
|
'sed -e s/pack-.*pack/pack-.pack/ edges.list >actual &&
|
||||||
diff -u expect actual'
|
git diff expect actual'
|
||||||
|
|
||||||
###
|
###
|
||||||
### series J
|
### series J
|
||||||
|
Loading…
Reference in New Issue
Block a user