1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-17 00:18:05 +02:00

commands/git : add test to Checkout, refactor

This commit is contained in:
Anthony HAMON
2018-09-16 22:08:23 +02:00
parent 67a42f49b4
commit b641d6bd96
2 changed files with 47 additions and 1 deletions

View File

@ -428,7 +428,7 @@ func (c *GitCommand) Checkout(branch string, force bool) error {
if force {
forceArg = "--force "
}
return c.OSCommand.RunCommand("git checkout " + forceArg + branch)
return c.OSCommand.RunCommand(fmt.Sprintf("git checkout %s %s", forceArg, branch))
}
// AddPatch prepares a subprocess for adding a patch by patch