Skip to content

Commit

Permalink
fix bug at rename function (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
JunNishimura committed Jun 6, 2023
1 parent 591a16a commit 7e0b09d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/store/refs.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (r *Refs) RenameBranch(head *Head, rootGoitPath, newBranchName string) erro

// get current branch
curNum := r.getBranchPos(head.Reference)
if n == NewBranchFlag {
if curNum == NewBranchFlag {
return fmt.Errorf("head branch '%s' does not exist", head.Reference)
}

Expand Down

0 comments on commit 7e0b09d

Please sign in to comment.