aboutsummaryrefslogtreecommitdiffstats
path: root/blame.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2019-07-29 17:46:48 +0200
committerGitHub <noreply@github.com>2019-07-29 17:46:48 +0200
commitd6c4b113c17a011530e93f179b7ac27eb3f17b9b (patch)
treee779d0a6defd166816da90ecbce3179636f30000 /blame.go
parentb294aa1351a9c1e9388d7901033596514cf5eaa9 (diff)
parentab19315b3137e0e10a4e638c8ea37610adc592ba (diff)
downloadgo-git-d6c4b113c17a011530e93f179b7ac27eb3f17b9b.tar.gz
Merge pull request #1199 from src-d/clean-up
*: code quality improvements
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: