Skip to content

Commit 92a7451

Browse files
committed
Change commiter to committer
"commiter" is typo. :%s/Commiter/Committer/g :%s/commiter/committer/g And do gofmt Signed-off-by: Lai Jiangshan <[email protected]>
1 parent 2d9842b commit 92a7451

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

.tools/validate.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ type CommitEntry struct {
145145
Signer string
146146
SignerKey string `json:"signer_key"`
147147
Author PersonAction `json:"author,omitempty"`
148-
Commiter PersonAction `json:"commiter,omitempty"`
148+
Committer PersonAction `json:"committer,omitempty"`
149149
}
150150

151151
// PersonAction is a time and identity of an action on a git commit
@@ -156,16 +156,16 @@ type PersonAction struct {
156156
}
157157

158158
var (
159-
prettyLogSubject = `--pretty=format:%s`
160-
prettyLogBody = `--pretty=format:%b`
161-
prettyLogCommit = `--pretty=format:%H`
162-
prettyLogAuthorName = `--pretty=format:%aN`
163-
prettyLogAuthorEmail = `--pretty=format:%aE`
164-
prettyLogCommiterName = `--pretty=format:%cN`
165-
prettyLogCommiterEmail = `--pretty=format:%cE`
166-
prettyLogSigner = `--pretty=format:%GS`
167-
prettyLogCommitNotes = `--pretty=format:%N`
168-
prettyLogFormat = `--pretty=format:{"commit": "%H", "abbreviated_commit": "%h", "tree": "%T", "abbreviated_tree": "%t", "parent": "%P", "abbreviated_parent": "%p", "refs": "%D", "encoding": "%e", "sanitized_subject_line": "%f", "verification_flag": "%G?", "signer_key": "%GK", "author": { "date": "%aD" }, "commiter": { "date": "%cD" }}`
159+
prettyLogSubject = `--pretty=format:%s`
160+
prettyLogBody = `--pretty=format:%b`
161+
prettyLogCommit = `--pretty=format:%H`
162+
prettyLogAuthorName = `--pretty=format:%aN`
163+
prettyLogAuthorEmail = `--pretty=format:%aE`
164+
prettyLogCommitterName = `--pretty=format:%cN`
165+
prettyLogCommitterEmail = `--pretty=format:%cE`
166+
prettyLogSigner = `--pretty=format:%GS`
167+
prettyLogCommitNotes = `--pretty=format:%N`
168+
prettyLogFormat = `--pretty=format:{"commit": "%H", "abbreviated_commit": "%h", "tree": "%T", "abbreviated_tree": "%t", "parent": "%P", "abbreviated_parent": "%p", "refs": "%D", "encoding": "%e", "sanitized_subject_line": "%f", "verification_flag": "%G?", "signer_key": "%GK", "author": { "date": "%aD" }, "committer": { "date": "%cD" }}`
169169
)
170170

171171
// GitLogCommit assembles the full information on a commit from its commit hash
@@ -210,17 +210,17 @@ func GitLogCommit(commit string) (*CommitEntry, error) {
210210
}
211211
c.Author.Email = strings.TrimSpace(string(output))
212212

213-
output, err = exec.Command("git", "log", "-1", prettyLogCommiterName, commit).Output()
213+
output, err = exec.Command("git", "log", "-1", prettyLogCommitterName, commit).Output()
214214
if err != nil {
215215
return nil, err
216216
}
217-
c.Commiter.Name = strings.TrimSpace(string(output))
217+
c.Committer.Name = strings.TrimSpace(string(output))
218218

219-
output, err = exec.Command("git", "log", "-1", prettyLogCommiterEmail, commit).Output()
219+
output, err = exec.Command("git", "log", "-1", prettyLogCommitterEmail, commit).Output()
220220
if err != nil {
221221
return nil, err
222222
}
223-
c.Commiter.Email = strings.TrimSpace(string(output))
223+
c.Committer.Email = strings.TrimSpace(string(output))
224224

225225
output, err = exec.Command("git", "log", "-1", prettyLogCommitNotes, commit).Output()
226226
if err != nil {

0 commit comments

Comments
 (0)