diff: make -O and --output work in subdirectory

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Duy Nguyen
2016-01-21 18:48:44 +07:00
committed by Junio C Hamano
parent e5f7a5d16f
commit a97262c62f
6 changed files with 21 additions and 8 deletions

View File

@ -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)" '