intersect_paths: respect mode in git's tree-sort
[gitweb.git] / t / t4056-diff-order.sh
index 1ddd226b7850dbeecba255e2b4f4164ce2ff8b67..c0460bb0e59c42de179fc6cbe0f3702a3b538a8e 100755 (executable)
@@ -68,10 +68,6 @@ test_expect_success POSIXPERM,SANITY 'unreadable orderfile' '
        test_must_fail git diff -Ounreadable_file --name-only HEAD^..HEAD
 '
 
-test_expect_success 'orderfile is a directory' '
-       test_must_fail git diff -O/ --name-only HEAD^..HEAD
-'
-
 for i in 1 2
 do
        test_expect_success "orderfile using option ($i)" '
@@ -101,4 +97,25 @@ do
        '
 done
 
+test_expect_success 'setup for testing combine-diff order' '
+       git checkout -b tmp HEAD~ &&
+       create_files 3 &&
+       git checkout master &&
+       git merge --no-commit -s ours tmp &&
+       create_files 5
+'
+
+test_expect_success "combine-diff: no order (=tree object order)" '
+       git diff --name-only HEAD HEAD^ HEAD^2 >actual &&
+       test_cmp expect_none actual
+'
+
+for i in 1 2
+do
+       test_expect_success "combine-diff: orderfile using option ($i)" '
+               git diff -Oorder_file_$i --name-only HEAD HEAD^ HEAD^2 >actual &&
+               test_cmp expect_$i actual
+       '
+done
+
 test_done