Skip to content

Commit

Permalink
fix: cmdgit BranchExist should match full branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavkj committed Nov 25, 2023
1 parent 6614064 commit 7ba8907
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/git/cmdgit/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (g *Git) BranchExist(remoteName, branchName string) (bool, error) {
if err != nil {
return false, err
}
return strings.Contains(stdOut, fmt.Sprintf("refs/heads/%s", branchName)), nil
return strings.Contains(stdOut, fmt.Sprintf("\trefs/heads/%s\n", branchName)), nil
}

// Push the committed changes to the remote
Expand Down

0 comments on commit 7ba8907

Please sign in to comment.