--- a/src/eric7/Plugins/VcsPlugins/vcsGit/ProjectHelper.py Wed Dec 14 15:52:39 2022 +0100 +++ b/src/eric7/Plugins/VcsPlugins/vcsGit/ProjectHelper.py Thu Dec 15 17:15:09 2022 +0100 @@ -1722,6 +1722,28 @@ self.gitSubmodulesSummaryAct.triggered.connect(self.__gitSubmodulesSummary) self.actions.append(self.gitSubmodulesSummaryAct) + self.gitWorktreeManagementAct = EricAction( + self.tr("Show Worktree Management"), + EricPixmapCache.getIcon("viewListTree"), + self.tr("Show Worktree Management"), + 0, + 0, + self, + "git_worktree_management", + ) + self.gitWorktreeManagementAct.setStatusTip( + self.tr("Show a dialog to manage the worktree containing the project") + ) + self.gitWorktreeManagementAct.setWhatsThis( + self.tr( + """<b>Show Worktree Management</b>""" + """<p>This shows a dialog to manage the worktree containing the""" + """ current project.</p>""" + ) + ) + self.gitWorktreeManagementAct.triggered.connect(self.__gitWorktreeManagement) + self.actions.append(self.gitWorktreeManagementAct) + def initMenu(self, menu): """ Public method to generate the VCS menu. @@ -1915,6 +1937,7 @@ menu.addSeparator() menu.addAction(self.vcsCommandAct) menu.addSeparator() + menu.addAction(self.gitWorktreeManagementAct) menu.addMenu(adminMenu) menu.addSeparator() menu.addAction(self.gitEditUserConfigAct) @@ -2792,3 +2815,9 @@ Private slot to show summary information for submodules of the project. """ self.vcs.gitSubmoduleSummary(self.project.getProjectPath()) + + def __gitWorktreeManagement(self): + """ + Private slot to show the worktree management dialog. + """ + self.vcs.gitWorktreeManagement(self.project.getProjectPath())