diff --git a/pkg/commands/git_commands/submodule.go b/pkg/commands/git_commands/submodule.go index d9d1ccd20..3f69ce875 100644 --- a/pkg/commands/git_commands/submodule.go +++ b/pkg/commands/git_commands/submodule.go @@ -141,7 +141,7 @@ func (self *SubmoduleCommands) Delete(submodule *models.SubmoduleConfig) error { // We may in fact want to use the repo's git dir path but git docs say not to // mix submodules and worktrees anyway. - return os.RemoveAll(filepath.Join(self.repoPaths.WorktreeGitDirPath(), "modules", submodule.Path)) + return os.RemoveAll(filepath.Join(self.repoPaths.WorktreeGitDirPath(), "modules", submodule.Name)) } func (self *SubmoduleCommands) Add(name string, path string, url string) error { diff --git a/pkg/integration/tests/submodule/remove.go b/pkg/integration/tests/submodule/remove.go index f4f1cd04f..22fb83f30 100644 --- a/pkg/integration/tests/submodule/remove.go +++ b/pkg/integration/tests/submodule/remove.go @@ -45,9 +45,6 @@ var Remove = NewIntegrationTest(NewIntegrationTestArgs{ Contains("- url = ../other_repo"), ) - /* EXPECTED: t.FileSystem().PathNotPresent(gitDirSubmodulePath) - ACTUAL: */ - t.FileSystem().PathPresent(gitDirSubmodulePath) }, })