Skip to content

Commit

Permalink
Update plumbing/protocol/packp/advrefs.go
Browse files Browse the repository at this point in the history
Co-authored-by: Paulo Gomes <[email protected]>
  • Loading branch information
aymanbagabas and pjbgf authored Jan 1, 2025
1 parent fecc06e commit 9b68e5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plumbing/protocol/packp/advrefs.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,11 @@ func (a *AdvRefs) IsEmpty() bool {
// MakeReferenceSlice returns a sorted slice with all the references, their
// peeled values, and symrefs.
func (a *AdvRefs) MakeReferenceSlice() ([]*plumbing.Reference, error) {
allRefs := make([]*plumbing.Reference, 0)
refs, err := a.AllReferences()
if err != nil {
return nil, err
}
allRefs := make([]*plumbing.Reference, 0, len(refs))

for _, ref := range refs {
allRefs = append(allRefs, ref)
Expand Down

0 comments on commit 9b68e5b

Please sign in to comment.