Fix lint
This commit is contained in:
parent
a1e1842e6d
commit
63f7372b31
2 changed files with 4 additions and 1 deletions
|
|
@ -22,7 +22,7 @@ type gitClient interface {
|
|||
type gitExecuter struct{}
|
||||
|
||||
func (g *gitExecuter) BranchRemote(branch string) (string, error) {
|
||||
args := append([]string{"rev-parse", "--symbolic-full-name", "--abbrev-ref", fmt.Sprintf("%s@{u}", branch)})
|
||||
args := []string{"rev-parse", "--symbolic-full-name", "--abbrev-ref", fmt.Sprintf("%s@{u}", branch)}
|
||||
cmd, err := git.GitCommand(args...)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
|
|
|||
|
|
@ -249,6 +249,9 @@ func executeLocalRepoSync(srcRepo ghrepo.Interface, remote string, opts *SyncOpt
|
|||
hasLocalBranch := git.HasLocalBranch([]string{branch})
|
||||
if hasLocalBranch {
|
||||
branchRemote, err := git.BranchRemote(branch)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if branchRemote != remote {
|
||||
return mismatchRemotesError
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue