about summary refs log tree commit diff
path: root/third_party/git/t/t2025-checkout-no-overlay.sh
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/git/t/t2025-checkout-no-overlay.sh')
-rwxr-xr-xthird_party/git/t/t2025-checkout-no-overlay.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/third_party/git/t/t2025-checkout-no-overlay.sh b/third_party/git/t/t2025-checkout-no-overlay.sh
index 76330cb5ab79..fa9e0987063b 100755
--- a/third_party/git/t/t2025-checkout-no-overlay.sh
+++ b/third_party/git/t/t2025-checkout-no-overlay.sh
@@ -44,4 +44,16 @@ test_expect_success '--no-overlay --theirs with D/F conflict deletes file' '
 	test_path_is_missing file1
 '
 
+test_expect_success 'wildcard pathspec matches file in subdirectory' '
+	git reset --hard &&
+	mkdir subdir &&
+	test_commit file3-1 subdir/file3 &&
+	test_commit file3-2 subdir/file3 &&
+
+	git checkout --no-overlay file3-1 "*file3" &&
+	echo file3-1 >expect &&
+	test_path_is_file subdir/file3 &&
+	test_cmp expect subdir/file3
+'
+
 test_done