aboutsummaryrefslogtreecommitdiffstats
path: root/blame.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 /blame.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 'blame.go')
-rw-r--r--blame.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/blame.go b/blame.go
index adb72d5..f610851 100644
--- a/blame.go
+++ b/blame.go
@@ -193,7 +193,7 @@ func (b *blame) fillGraphAndData() error {
// this first commit.
if i == 0 {
for j := 0; j < nLines; j++ {
- b.graph[i][j] = (*object.Commit)(b.revs[i])
+ b.graph[i][j] = b.revs[i]
}
} else {
// if this is not the first commit, then assign to the old
@@ -211,7 +211,7 @@ func (b *blame) sliceGraph(i int) []*object.Commit {
fVs := b.graph[i]
result := make([]*object.Commit, 0, len(fVs))
for _, v := range fVs {
- c := object.Commit(*v)
+ c := *v
result = append(result, &c)
}
return result
@@ -234,7 +234,7 @@ func (b *blame) assignOrigin(c, p int) {
b.graph[c][dl] = b.graph[p][sl]
case hunks[h].Type == 1:
dl++
- b.graph[c][dl] = (*object.Commit)(b.revs[c])
+ b.graph[c][dl] = b.revs[c]
case hunks[h].Type == -1:
sl++
default: