mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-31 14:24:25 +03:00
Extend submodule tests to use a submodule where name and path are different
In most real-world scenarios, name and path are usually the same. They don't have to be though, and it's important to make sure we use the right one when passing arguments to git commands, so change the tests to have different name and path.
This commit is contained in:
@ -345,9 +345,9 @@ func (self *Shell) CloneIntoRemote(name string) *Shell {
|
||||
return self
|
||||
}
|
||||
|
||||
func (self *Shell) CloneIntoSubmodule(submoduleName string) *Shell {
|
||||
func (self *Shell) CloneIntoSubmodule(submoduleName string, submodulePath string) *Shell {
|
||||
self.Clone("other_repo")
|
||||
self.RunCommand([]string{"git", "submodule", "add", "../other_repo", submoduleName})
|
||||
self.RunCommand([]string{"git", "submodule", "add", "--name", submoduleName, "../other_repo", submodulePath})
|
||||
|
||||
return self
|
||||
}
|
||||
|
Reference in New Issue
Block a user