Imported Upstream version 2.10.2
[platform/upstream/git.git] / t / t4013-diff-various.sh
index e77c09c..94ef500 100755 (executable)
@@ -90,6 +90,8 @@ test_expect_success setup '
        git commit -m "Rearranged lines in dir/sub" &&
        git checkout master &&
 
+       git config diff.renames false &&
+
        git show-branch
 '
 
@@ -107,14 +109,14 @@ test_expect_success setup '
 +*++ [initial] Initial
 EOF
 
-V=`git version | sed -e 's/^git version //' -e 's/\./\\./g'`
+V=$(git version | sed -e 's/^git version //' -e 's/\./\\./g')
 while read cmd
 do
        case "$cmd" in
        '' | '#'*) continue ;;
        esac
-       test=`echo "$cmd" | sed -e 's|[/ ][/ ]*|_|g'`
-       pfx=`printf "%04d" $test_count`
+       test=$(echo "$cmd" | sed -e 's|[/ ][/ ]*|_|g')
+       pfx=$(printf "%04d" $test_count)
        expect="$TEST_DIRECTORY/t4013/diff.$test"
        actual="$pfx-diff.$test"
 
@@ -324,4 +326,14 @@ test_expect_success 'diff --cached -- file on unborn branch' '
        test_cmp "$TEST_DIRECTORY/t4013/diff.diff_--cached_--_file0" result
 '
 
+test_expect_success 'diff-tree --stdin with log formatting' '
+       cat >expect <<-\EOF &&
+       Side
+       Third
+       Second
+       EOF
+       git rev-list master | git diff-tree --stdin --format=%s -s >actual &&
+       test_cmp expect actual
+'
+
 test_done