all repos — elgit @ 2288b32910ef20bfb53586d9d76786fb54b73b96

fork of legit: web frontend for git, written in go

resolve linter complaints

Alan Pearce
commit

2288b32910ef20bfb53586d9d76786fb54b73b96

parent

f16bbb0a0f40ff7c25582c4e787f1de3e9db4e95

1 file changed, 4 insertions(+), 4 deletions(-)

changed files
M git/diff.gogit/diff.go
@@ -46,7 +46,7 @@ Diff []Diff
} // DiffFile returns a diff for a specific file in the current commit -func (g *GitRepo) DiffFile(filePath string) (*NiceDiff, error) { +func (g *Repo) DiffFile(filePath string) (*NiceDiff, error) { niceDiff, err := g.Diff() if err != nil { return nil, err
@@ -100,7 +100,7 @@ Diff: filteredDiffs,
}, nil } -func (g *GitRepo) Diff() (*NiceDiff, error) { +func (g *Repo) Diff() (*NiceDiff, error) { c, err := g.r.CommitObject(g.h) if err != nil { return nil, fmt.Errorf("commit object: %w", err)
@@ -162,9 +162,9 @@ })
for _, l := range tf.Lines { switch l.Op { case gitdiff.OpAdd: - nd.Stat.Insertions += 1 + nd.Stat.Insertions++ case gitdiff.OpDelete: - nd.Stat.Deletions += 1 + nd.Stat.Deletions++ } } }