diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-04-26 20:48:13 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2017-04-26 20:48:13 +0200 |
commit | 9b75cb91384dd08eed2acce8c3099e082835da12 (patch) | |
tree | f559053ac65bd67e29412f586e71fc2969cd0b8f /plumbing/format/index/encoder.go | |
parent | 64cd72debb2a94a49de5ffd3c3a6bfd626df7340 (diff) | |
download | go-git-9b75cb91384dd08eed2acce8c3099e082835da12.tar.gz |
plumbing: index, Entries converted in a slice of pointers
Diffstat (limited to 'plumbing/format/index/encoder.go')
-rw-r--r-- | plumbing/format/index/encoder.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plumbing/format/index/encoder.go b/plumbing/format/index/encoder.go index d568f15..7111314 100644 --- a/plumbing/format/index/encoder.go +++ b/plumbing/format/index/encoder.go @@ -65,7 +65,7 @@ func (e *Encoder) encodeEntries(idx *Index) error { sort.Sort(byName(idx.Entries)) for _, entry := range idx.Entries { - if err := e.encodeEntry(&entry); err != nil { + if err := e.encodeEntry(entry); err != nil { return err } @@ -143,7 +143,7 @@ func (e *Encoder) encodeFooter() error { return binary.Write(e.w, e.hash.Sum(nil)) } -type byName []Entry +type byName []*Entry func (l byName) Len() int { return len(l) } func (l byName) Swap(i, j int) { l[i], l[j] = l[j], l[i] } |