Remove awkward compatibility warts
[gitweb.git] / t / t4013-diff-various.sh
index 22984e3db742365117e19040d88a6c79daf284cb..026832761f9a2cc3436a083ac9f28b2d9deebd49 100755 (executable)
@@ -85,6 +85,7 @@ test_expect_success setup '
 +*+ [initial] Initial
 EOF
 
+V=`git version | sed -e 's/^git version //'`
 while read cmd
 do
        case "$cmd" in
@@ -99,7 +100,7 @@ do
        test_expect_success "git $cmd" '
                {
                        echo "\$ git $cmd"
-                       git $cmd
+                       git $cmd | sed -e "s/$V/g-i-t--v-e-r-s-i-o-n/"
                        echo "\$"
                } >"$actual" &&
                if test -f "$expect"
@@ -137,7 +138,10 @@ diff-tree --pretty --summary initial
 diff-tree --pretty --stat --summary initial
 diff-tree --pretty --root -p initial
 diff-tree --pretty --root --stat initial
-#diff-tree --pretty --root --summary initial
+# improved by Timo's patch
+diff-tree --pretty --root --summary initial
+# improved by Timo's patch
+diff-tree --pretty --root --summary -r initial
 diff-tree --pretty --root --stat --summary initial
 diff-tree --pretty --patch-with-stat initial
 diff-tree --pretty --root --patch-with-stat initial
@@ -149,6 +153,7 @@ diff-tree --pretty=oneline --root initial
 diff-tree --pretty=oneline -p initial
 diff-tree --pretty=oneline --root -p initial
 diff-tree --pretty=oneline --patch-with-stat initial
+# improved by Timo's patch
 diff-tree --pretty=oneline --root --patch-with-stat initial
 diff-tree --pretty=oneline --patch-with-raw initial
 diff-tree --pretty=oneline --root --patch-with-raw initial
@@ -171,11 +176,9 @@ diff-tree --cc --stat --summary master
 # stat summary should show the diffstat and summary with the first parent
 diff-tree -c --stat --summary side
 diff-tree --cc --stat --summary side
-# this one gives an extra newline after stat, which should be removed
-# diff-tree --cc --patch-with-stat master
-# this one gives an extra newline after stat, which should be removed
-# other than that it shows the correct example -- stat and summary are
-# against the first parent, and patch-looking combined diff follows.
+# improved by Timo's patch
+diff-tree --cc --patch-with-stat master
+# improved by Timo's patch
 diff-tree --cc --patch-with-stat --summary master
 # this is correct
 diff-tree --cc --patch-with-stat --summary side
@@ -187,7 +190,9 @@ log --root -p master
 log --patch-with-stat master
 log --root --patch-with-stat master
 log --root --patch-with-stat --summary master
+# improved by Timo's patch
 log --root -c --patch-with-stat --summary master
+# improved by Timo's patch
 log --root --cc --patch-with-stat --summary master
 log -SF master
 log -SF -p master
@@ -199,7 +204,9 @@ whatchanged --root -p master
 whatchanged --patch-with-stat master
 whatchanged --root --patch-with-stat master
 whatchanged --root --patch-with-stat --summary master
+# improved by Timo's patch
 whatchanged --root -c --patch-with-stat --summary master
+# improved by Timo's patch
 whatchanged --root --cc --patch-with-stat --summary master
 whatchanged -SF master
 whatchanged -SF -p master
@@ -219,6 +226,13 @@ show --patch-with-stat side
 show --patch-with-raw side
 show --patch-with-stat --summary side
 
+format-patch --stdout initial..side
+format-patch --stdout initial..master^
+format-patch --stdout initial..master
+format-patch --attach --stdout initial..side
+format-patch --attach --stdout initial..master^
+format-patch --attach --stdout initial..master
+
 EOF
 
 test_done