Skip to content

Commit 63f7372

Browse files
committed
Fix lint
1 parent a1e1842 commit 63f7372

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pkg/cmd/repo/sync/git.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type gitClient interface {
2222
type gitExecuter struct{}
2323

2424
func (g *gitExecuter) BranchRemote(branch string) (string, error) {
25-
args := append([]string{"rev-parse", "--symbolic-full-name", "--abbrev-ref", fmt.Sprintf("%s@{u}", branch)})
25+
args := []string{"rev-parse", "--symbolic-full-name", "--abbrev-ref", fmt.Sprintf("%s@{u}", branch)}
2626
cmd, err := git.GitCommand(args...)
2727
if err != nil {
2828
return "", err

pkg/cmd/repo/sync/sync.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,9 @@ func executeLocalRepoSync(srcRepo ghrepo.Interface, remote string, opts *SyncOpt
249249
hasLocalBranch := git.HasLocalBranch([]string{branch})
250250
if hasLocalBranch {
251251
branchRemote, err := git.BranchRemote(branch)
252+
if err != nil {
253+
return err
254+
}
252255
if branchRemote != remote {
253256
return mismatchRemotesError
254257
}

0 commit comments

Comments
 (0)