1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Minor refactor

This commit is contained in:
Jesse Duffield
2021-07-27 20:02:52 +10:00
parent 3802b563b0
commit 58ddbae4d1
6 changed files with 98 additions and 143 deletions

View File

@ -2,8 +2,6 @@ package commands
import (
"fmt"
"github.com/jesseduffield/lazygit/pkg/commands/models"
)
func (c *GitCommand) AddRemote(name string, url string) error {
@ -28,10 +26,10 @@ func (c *GitCommand) DeleteRemoteBranch(remoteName string, branchName string, pr
}
// CheckRemoteBranchExists Returns remote branch
func (c *GitCommand) CheckRemoteBranchExists(branch *models.Branch) bool {
func (c *GitCommand) CheckRemoteBranchExists(branchName string) bool {
_, err := c.OSCommand.RunCommandWithOutput(
"git show-ref --verify -- refs/remotes/origin/%s",
branch.Name,
branchName,
)
return err == nil