Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit 95f48f3

Browse files
author
Dj Gilcrease
committed
go fmt
1 parent fa19052 commit 95f48f3

File tree

18 files changed

+1286
-1288
lines changed

18 files changed

+1286
-1288
lines changed

config/config.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ type Config struct {
6262
// Branches list of branches, the key is the branch name and should
6363
// equal Branch.Name
6464
Branches map[string]*Branch
65-
User *User
65+
User *User
6666
// Raw contains the raw information of a config file. The main goal is
6767
// preserve the parsed information from the original format, to avoid
6868
// dropping unsupported fields.
@@ -75,7 +75,7 @@ func NewConfig() *Config {
7575
Remotes: make(map[string]*RemoteConfig),
7676
Submodules: make(map[string]*Submodule),
7777
Branches: make(map[string]*Branch),
78-
User: new(User),
78+
User: new(User),
7979
Raw: format.New(),
8080
}
8181

@@ -123,9 +123,9 @@ const (
123123
windowKey = "window"
124124
mergeKey = "merge"
125125
rebaseKey = "rebase"
126-
userSection = "user"
127-
nameKey = "name"
128-
emailKey = "email"
126+
userSection = "user"
127+
nameKey = "name"
128+
emailKey = "email"
129129

130130
// DefaultPackWindow holds the number of previous objects used to
131131
// generate deltas. The value 10 is the same used by git command.

config/user.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package config
22

33
type User struct {
4-
Name string
4+
Name string
55
Email string
66
}

internal/revision/parser_test.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ func (s *ParserSuite) TestParseWithValidExpression(c *C) {
9696
TildePath{3},
9797
},
9898
"@{2016-12-16T21:42:47Z}": []Revisioner{AtDate{tim}},
99-
"@{1}": []Revisioner{AtReflog{1}},
100-
"@{-1}": []Revisioner{AtCheckout{1}},
99+
"@{1}": []Revisioner{AtReflog{1}},
100+
"@{-1}": []Revisioner{AtCheckout{1}},
101101
"master@{upstream}": []Revisioner{
102102
Ref("master"),
103103
AtUpstream{},
@@ -211,12 +211,12 @@ func (s *ParserSuite) TestParseAtWithValidExpression(c *C) {
211211
tim, _ := time.Parse("2006-01-02T15:04:05Z", "2016-12-16T21:42:47Z")
212212

213213
datas := map[string]Revisioner{
214-
"": Ref("HEAD"),
215-
"{1}": AtReflog{1},
216-
"{-1}": AtCheckout{1},
217-
"{push}": AtPush{},
218-
"{upstream}": AtUpstream{},
219-
"{u}": AtUpstream{},
214+
"": Ref("HEAD"),
215+
"{1}": AtReflog{1},
216+
"{-1}": AtCheckout{1},
217+
"{push}": AtPush{},
218+
"{upstream}": AtUpstream{},
219+
"{u}": AtUpstream{},
220220
"{2016-12-16T21:42:47Z}": AtDate{tim},
221221
}
222222

+35-35
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
package commitgraph
2-
3-
import (
4-
"time"
5-
6-
"gopkg.in/src-d/go-git.v4/plumbing"
7-
)
8-
9-
// CommitData is a reduced representation of Commit as presented in the commit graph
10-
// file. It is merely useful as an optimization for walking the commit graphs.
11-
type CommitData struct {
12-
// TreeHash is the hash of the root tree of the commit.
13-
TreeHash plumbing.Hash
14-
// ParentIndexes are the indexes of the parent commits of the commit.
15-
ParentIndexes []int
16-
// ParentHashes are the hashes of the parent commits of the commit.
17-
ParentHashes []plumbing.Hash
18-
// Generation number is the pre-computed generation in the commit graph
19-
// or zero if not available
20-
Generation int
21-
// When is the timestamp of the commit.
22-
When time.Time
23-
}
24-
25-
// Index represents a representation of commit graph that allows indexed
26-
// access to the nodes using commit object hash
27-
type Index interface {
28-
// GetIndexByHash gets the index in the commit graph from commit hash, if available
29-
GetIndexByHash(h plumbing.Hash) (int, error)
30-
// GetNodeByIndex gets the commit node from the commit graph using index
31-
// obtained from child node, if available
32-
GetCommitDataByIndex(i int) (*CommitData, error)
33-
// Hashes returns all the hashes that are available in the index
34-
Hashes() []plumbing.Hash
35-
}
1+
package commitgraph
2+
3+
import (
4+
"time"
5+
6+
"gopkg.in/src-d/go-git.v4/plumbing"
7+
)
8+
9+
// CommitData is a reduced representation of Commit as presented in the commit graph
10+
// file. It is merely useful as an optimization for walking the commit graphs.
11+
type CommitData struct {
12+
// TreeHash is the hash of the root tree of the commit.
13+
TreeHash plumbing.Hash
14+
// ParentIndexes are the indexes of the parent commits of the commit.
15+
ParentIndexes []int
16+
// ParentHashes are the hashes of the parent commits of the commit.
17+
ParentHashes []plumbing.Hash
18+
// Generation number is the pre-computed generation in the commit graph
19+
// or zero if not available
20+
Generation int
21+
// When is the timestamp of the commit.
22+
When time.Time
23+
}
24+
25+
// Index represents a representation of commit graph that allows indexed
26+
// access to the nodes using commit object hash
27+
type Index interface {
28+
// GetIndexByHash gets the index in the commit graph from commit hash, if available
29+
GetIndexByHash(h plumbing.Hash) (int, error)
30+
// GetNodeByIndex gets the commit node from the commit graph using index
31+
// obtained from child node, if available
32+
GetCommitDataByIndex(i int) (*CommitData, error)
33+
// Hashes returns all the hashes that are available in the index
34+
Hashes() []plumbing.Hash
35+
}

0 commit comments

Comments
 (0)