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

support merging remote branches into checked out branch

This commit is contained in:
Jesse Duffield
2019-11-17 13:21:38 +11:00
parent 55ff0c0dee
commit 2afbd7ba7f
4 changed files with 34 additions and 9 deletions

View File

@ -1080,3 +1080,8 @@ func (c *GitCommand) AddRemote(name string, url string) error {
func (c *GitCommand) RemoveRemote(name string) error {
return c.OSCommand.RunCommand(fmt.Sprintf("git remote remove %s", name))
}
func (c *GitCommand) IsHeadDetached() bool {
err := c.OSCommand.RunCommand("git symbolic-ref -q HEAD")
return err != nil
}