Update name

This commit is contained in:
Corey Johnson 2020-05-22 15:07:39 -07:00
parent 368aacbff6
commit 858cd705ab
2 changed files with 2 additions and 2 deletions

View file

@ -569,7 +569,7 @@ func prMerge(cmd *cobra.Command, args []string) error {
}
}
localBranchExists := git.DoesLocalBranchExist(pr.HeadRefName)
localBranchExists := git.HasLocalBranch(pr.HeadRefName)
if localBranchExists {
err = git.DeleteLocalBranch(pr.HeadRefName)
if err != nil {

View file

@ -215,7 +215,7 @@ func DeleteRemoteBranch(branch string) error {
return err
}
func DoesLocalBranchExist(branch string) bool {
func HasLocalBranch(branch string) bool {
configCmd := GitCommand("rev-parse", "--verify", "refs/heads/"+branch)
_, err := run.PrepareCmd(configCmd).Output()
return err == nil