summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2010-11-17 15:00:56 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-11-17 15:00:56 -0800
commitba0254cb32537b7a7e92854a51256475ee83cdda (patch)
tree6e8bcfa99201c20d8647600e74b78e580cfd23cf /t
parentMerge branch 'jn/send-pack-error' (diff)
parentmerge-file: correctly find files when called in subdir (diff)
downloadtgif-ba0254cb32537b7a7e92854a51256475ee83cdda.tar.xz
Merge branch 'tr/maint-merge-file-subdir'
* 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"