]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t9902-completion.sh
completion: ensure that the repository path given on the command line exists
[thirdparty/git.git] / t / t9902-completion.sh
index 7956cb9b16d5fcda6fe5eeecca7f4af929f16900..7667baabff0437cbe74db3411313949a34612ae5 100755 (executable)
@@ -211,6 +211,14 @@ test_expect_success '__gitdir - $GIT_DIR set while .git directory in parent' '
        test_cmp expected "$actual"
 '
 
+test_expect_success '__gitdir - non-existing path in $__git_dir' '
+       (
+               __git_dir="non-existing" &&
+               test_must_fail __gitdir >"$actual"
+       ) &&
+       test_must_be_empty "$actual"
+'
+
 test_expect_success '__gitdir - non-existing $GIT_DIR' '
        (
                GIT_DIR="$ROOT/non-existing" &&