diff options
author | Ethan Koenig <etk39@cornell.edu> | 2017-01-04 19:50:34 -0500 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-01-05 08:50:34 +0800 |
commit | 1207bda94b8de9f0cc618c4ccce235d809a5559e (patch) | |
tree | 9650961a7aa1dd3de883f5f6bef27db420b26227 /models/graph.go | |
parent | dc3ff9f2abc935f06940de56d613dacde3ee8c13 (diff) | |
download | gitea-1207bda94b8de9f0cc618c4ccce235d809a5559e.tar.gz gitea-1207bda94b8de9f0cc618c4ccce235d809a5559e.zip |
Fix typos in models/ (#576)
Diffstat (limited to 'models/graph.go')
-rw-r--r-- | models/graph.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/models/graph.go b/models/graph.go index 973476a746..7413f409de 100644 --- a/models/graph.go +++ b/models/graph.go @@ -31,7 +31,7 @@ type GraphItems []GraphItem // GetCommitGraph return a list of commit (GraphItems) from all branches func GetCommitGraph(r *git.Repository) (GraphItems, error) { - var Commitgraph []GraphItem + var CommitGraph []GraphItem format := "DATA:|%d|%H|%ad|%an|%ae|%h|%s" @@ -47,19 +47,19 @@ func GetCommitGraph(r *git.Repository) (GraphItems, error) { ) graph, err := graphCmd.RunInDir(r.Path) if err != nil { - return Commitgraph, err + return CommitGraph, err } - Commitgraph = make([]GraphItem, 0, 100) + CommitGraph = make([]GraphItem, 0, 100) for _, s := range strings.Split(graph, "\n") { GraphItem, err := graphItemFromString(s, r) if err != nil { - return Commitgraph, err + return CommitGraph, err } - Commitgraph = append(Commitgraph, GraphItem) + CommitGraph = append(CommitGraph, GraphItem) } - return Commitgraph, nil + return CommitGraph, nil } func graphItemFromString(s string, r *git.Repository) (GraphItem, error) { @@ -102,7 +102,7 @@ func graphItemFromString(s string, r *git.Repository) (GraphItem, error) { rows[5], rows[6], rows[7], - len(rows[2]) == 0, // no commits refered to, only relation in current line. + len(rows[2]) == 0, // no commits referred to, only relation in current line. } return gi, nil } |