From 384dbf730bc337ff66a2705af707d12a515eca9e Mon Sep 17 00:00:00 2001 From: tim775 <52185+tim775@users.noreply.github.com> Date: Wed, 6 Mar 2024 12:03:56 -0500 Subject: git: worktree, Don't panic on empty or root path when checking if it is valid I didn't dig into the specific case that was triggering this, but we did have a panic in our production system. --- worktree_test.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'worktree_test.go') 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}, -- cgit