aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/commitgraph/memory.go
diff options
context:
space:
mode:
authorChristian Muehlhaeuser <muesli@gmail.com>2019-07-21 06:24:22 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2019-07-29 17:34:49 +0200
commite5c9c0dd9ff1f42dcdaba7a51919cf43abdb79f9 (patch)
treeb6e968170f14360f8ed6bc5820788db847ba93b9 /plumbing/format/commitgraph/memory.go
parentbfe45eef34bfad73dc9c5255ac8f06ae19501554 (diff)
downloadgo-git-e5c9c0dd9ff1f42dcdaba7a51919cf43abdb79f9.tar.gz
*: avoid unnecessary conversions
No need to convert these values, they're already of the right type. Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com> (cherry picked from commit a1d8a7ac8bd0e4aff0f27dbb8bb37b8bd13a1346)
Diffstat (limited to 'plumbing/format/commitgraph/memory.go')
-rw-r--r--plumbing/format/commitgraph/memory.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/plumbing/format/commitgraph/memory.go b/plumbing/format/commitgraph/memory.go
index a4a96e9..f5afd4c 100644
--- a/plumbing/format/commitgraph/memory.go
+++ b/plumbing/format/commitgraph/memory.go
@@ -31,7 +31,7 @@ func (mi *MemoryIndex) GetIndexByHash(h plumbing.Hash) (int, error) {
// GetCommitDataByIndex gets the commit node from the commit graph using index
// obtained from child node, if available
func (mi *MemoryIndex) GetCommitDataByIndex(i int) (*CommitData, error) {
- if int(i) >= len(mi.commitData) {
+ if i >= len(mi.commitData) {
return nil, plumbing.ErrObjectNotFound
}