Show all submodules recursively

This commit is contained in:
Stefan Haller 2024-02-04 22:42:58 +01:00
parent db4f12929e
commit 3b723282cb
13 changed files with 260 additions and 21 deletions

View file

@ -60,6 +60,14 @@ func (self *GitCommandBuilder) Dir(path string) *GitCommandBuilder {
return self
}
func (self *GitCommandBuilder) DirIf(condition bool, path string) *GitCommandBuilder {
if condition {
return self.Dir(path)
}
return self
}
// Note, you may prefer to use the Dir method instead of this one
func (self *GitCommandBuilder) Worktree(path string) *GitCommandBuilder {
// worktree arg comes before the command