aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-12-02 11:26:40 -0800
committerJunio C Hamano <gitster@pobox.com>2010-12-02 11:26:40 -0800
commita49e9af4939c1223020db7915ee612d836c1bcdc (patch)
tree51285aad2c6a4942b85542df0a07d658d69ef6df /t
parent9f6774ed86a9ac22142c0b37e26e67eb1d032962 (diff)
parent55846b9abd128185388418e025651cfd6a299a0e (diff)
downloadgit-a49e9af4939c1223020db7915ee612d836c1bcdc.tar.gz
git-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 d486d7399..d9f343942 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"