summaryrefslogtreecommitdiff
path: root/t/t1003-read-tree-prefix.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t1003-read-tree-prefix.sh')
-rwxr-xr-xt/t1003-read-tree-prefix.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t1003-read-tree-prefix.sh b/t/t1003-read-tree-prefix.sh
index e0db2066f3..c860c08ecb 100755
--- a/t/t1003-read-tree-prefix.sh
+++ b/t/t1003-read-tree-prefix.sh
@@ -25,4 +25,14 @@ test_expect_success 'read-tree --prefix' '
cmp expect actual
'
+test_expect_success 'read-tree --prefix with leading slash exits with error' '
+ git rm -rf . &&
+ test_must_fail git read-tree --prefix=/two/ $tree &&
+ git read-tree --prefix=two/ $tree &&
+
+ git rm -rf . &&
+ test_must_fail git read-tree --prefix=/ $tree &&
+ git read-tree --prefix= $tree
+'
+
test_done