summaryrefslogtreecommitdiff
path: root/t/t1501-work-tree.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t1501-work-tree.sh')
-rwxr-xr-xt/t1501-work-tree.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t1501-work-tree.sh b/t/t1501-work-tree.sh
index cc5b870..b06210e 100755
--- a/t/t1501-work-tree.sh
+++ b/t/t1501-work-tree.sh
@@ -423,4 +423,12 @@ test_expect_success '$GIT_WORK_TREE overrides $GIT_DIR/common' '
)
'
+test_expect_success 'error out gracefully on invalid $GIT_WORK_TREE' '
+ (
+ GIT_WORK_TREE=/.invalid/work/tree &&
+ export GIT_WORK_TREE &&
+ test_expect_code 128 git rev-parse
+ )
+'
+
test_done