Skip to content

Commit

Permalink
refactoring NewRefs (#98)
Browse files Browse the repository at this point in the history
sort r.Heads when to init
  • Loading branch information
JunNishimura committed Jun 6, 2023
1 parent d262ada commit 10801d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/store/refs.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func NewRefs(rootGoitPath string) (*Refs, error) {
}
r.Heads = append(r.Heads, b)
}
sort.Slice(r.Heads, func(i, j int) bool { return r.Heads[i].Name < r.Heads[j].Name })
return r, nil
}

Expand Down

0 comments on commit 10801d1

Please sign in to comment.