Merge branch 'nd/do-not-move-worktree-manually' into maint
[gitweb.git] / t / t4056-diff-order.sh
index 9e2b29ede508e3d0822f5eb607db2ae4896611e6..43dd474a12e97945d38de00f7ab99f30d73490ea 100755 (executable)
@@ -68,6 +68,12 @@ test_expect_success POSIXPERM,SANITY 'unreadable orderfile' '
        test_must_fail git diff -Ounreadable_file --name-only HEAD^..HEAD
 '
 
+test_expect_success "orderfile using option from subdir with --output" '
+       mkdir subdir &&
+       git -C subdir diff -O../order_file_1 --output ../actual --name-only HEAD^..HEAD &&
+       test_cmp expect_1 actual
+'
+
 for i in 1 2
 do
        test_expect_success "orderfile using option ($i)" '
@@ -97,4 +103,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