summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2010-12-02 11:26:40 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-12-02 11:26:40 -0800
commita49e9af4939c1223020db7915ee612d836c1bcdc (patch)
tree51285aad2c6a4942b85542df0a07d658d69ef6df /t
parentMerge branch 'ks/no-textconv-symlink' into maint (diff)
parentmerge-file: correctly find files when called in subdir (diff)
downloadtgif-a49e9af4939c1223020db7915ee612d836c1bcdc.tar.xz
Merge branch 'tr/maint-merge-file-subdir' into maint
* tr/maint-merge-file-subdir: merge-file: correctly find files when called in subdir prefix_filename(): safely handle the case where pfx_len=0
Diffstat (limited to 't')
-rwxr-xr-xt/t6023-merge-file.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t6023-merge-file.sh b/t/t6023-merge-file.sh
index d486d73994..d9f343942c 100755
--- a/t/t6023-merge-file.sh
+++ b/t/t6023-merge-file.sh
@@ -64,6 +64,14 @@ cp new1.txt test.txt
test_expect_success "merge without conflict" \
"git merge-file test.txt orig.txt new2.txt"
+test_expect_success 'works in subdirectory' '
+ mkdir dir &&
+ cp new1.txt dir/a.txt &&
+ cp orig.txt dir/o.txt &&
+ cp new2.txt dir/b.txt &&
+ ( cd dir && git merge-file a.txt o.txt b.txt )
+'
+
cp new1.txt test.txt
test_expect_success "merge without conflict (--quiet)" \
"git merge-file --quiet test.txt orig.txt new2.txt"