summaryrefslogtreecommitdiff
path: root/t/t4056-diff-order.sh
diff options
context:
space:
mode:
authorSamuel Bronson <naesten@gmail.com>2013-12-19 00:08:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-12-19 00:39:00 (GMT)
commit6d8940b562adc5e43068868109dffe1b9bff7f78 (patch)
treeed16e6a73761475bbc567340b721a0fdca36ac4a /t/t4056-diff-order.sh
parenta21bae33d9e13c59217639b866355f1a02211a2c (diff)
downloadgit-6d8940b562adc5e43068868109dffe1b9bff7f78.zip
git-6d8940b562adc5e43068868109dffe1b9bff7f78.tar.gz
git-6d8940b562adc5e43068868109dffe1b9bff7f78.tar.bz2
diff: add diff.orderfile configuration variable
diff.orderfile acts as a default for the -O command line option. [sb: split up aw's original patch; rework tests and docs, treat option as pathname] Signed-off-by: Anders Waldenborg <anders@0x63.nu> Signed-off-by: Samuel Bronson <naesten@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4056-diff-order.sh')
-rwxr-xr-xt/t4056-diff-order.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t4056-diff-order.sh b/t/t4056-diff-order.sh
index ae8036b..1ddd226 100755
--- a/t/t4056-diff-order.sh
+++ b/t/t4056-diff-order.sh
@@ -89,6 +89,16 @@ do
wait &&
test_cmp expect_$i actual
'
+
+ test_expect_success "orderfile using config ($i)" '
+ git -c diff.orderfile=order_file_$i diff --name-only HEAD^..HEAD >actual &&
+ test_cmp expect_$i actual
+ '
+
+ test_expect_success "cancelling configured orderfile ($i)" '
+ git -c diff.orderfile=order_file_$i diff -O/dev/null --name-only HEAD^..HEAD >actual &&
+ test_cmp expect_none actual
+ '
done
test_done