mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-23 00:39:13 +02:00
allow updating submodule url
This commit is contained in:
@ -94,7 +94,7 @@ func (c *GitCommand) SubmoduleDelete(submodule *models.SubmoduleConfig) error {
|
||||
return os.RemoveAll(filepath.Join(c.DotGitDir, "modules", submodule.Path))
|
||||
}
|
||||
|
||||
func (c *GitCommand) AddSubmodule(name string, path string, url string) error {
|
||||
func (c *GitCommand) SubmoduleAdd(name string, path string, url string) error {
|
||||
return c.OSCommand.RunCommand(
|
||||
"git submodule add --force --name %s -- %s %s ",
|
||||
c.OSCommand.Quote(name),
|
||||
@ -102,3 +102,7 @@ func (c *GitCommand) AddSubmodule(name string, path string, url string) error {
|
||||
c.OSCommand.Quote(path),
|
||||
)
|
||||
}
|
||||
|
||||
func (c *GitCommand) SubmoduleUpdateUrl(path string, newUrl string) error {
|
||||
return c.OSCommand.RunCommand("git submodule set-url -- %s %s", path, newUrl)
|
||||
}
|
||||
|
Reference in New Issue
Block a user