aboutsummaryrefslogtreecommitdiffstats
path: root/worktree_test.go
diff options
context:
space:
mode:
authorPaulo Gomes <pjbgf@linux.com>2024-03-06 18:31:33 +0000
committerGitHub <noreply@github.com>2024-03-06 18:31:33 +0000
commitefdd3995a97305ade02e482ef99f8b989b5ef55f (patch)
treecee04e7a2e7a5083b06d25c0081b35d490f75544 /worktree_test.go
parent8d007039aba42c77964cdcb14dd8b86ccabb3469 (diff)
parent384dbf730bc337ff66a2705af707d12a515eca9e (diff)
downloadgo-git-efdd3995a97305ade02e482ef99f8b989b5ef55f.tar.gz
Merge pull request #1042 from tim775/fix/worktree_valid_path_panic
git: worktree, Don't panic on empty or root path when checking if it is valid
Diffstat (limited to 'worktree_test.go')
-rw-r--r--worktree_test.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/worktree_test.go b/worktree_test.go
index 2c3c592..668c30a 100644
--- a/worktree_test.go
+++ b/worktree_test.go
@@ -2957,6 +2957,8 @@ func TestValidPath(t *testing.T) {
{"git~1", true},
{"a/../b", true},
{"a\\..\\b", true},
+ {"/", true},
+ {"", true},
{".gitmodules", false},
{".gitignore", false},
{"a..b", false},