summaryrefslogtreecommitdiff
path: root/commits.go
diff options
context:
space:
mode:
authorKatolaZ <katolaz@freaknet.org>2017-08-01 08:13:42 +0100
committerKatolaZ <katolaz@freaknet.org>2017-08-01 08:13:42 +0100
commit587c8bf41568c9624f9874bb4e2549227c1e3b63 (patch)
tree4b868145aa42682fd6093d653d5e23d56fe7604e /commits.go
parent3fcaf22bbb9425f2f393dcbba492912a8a246f92 (diff)
sources passed thorugh gometalinterlint-refactor
Diffstat (limited to 'commits.go')
-rw-r--r--commits.go25
1 files changed, 11 insertions, 14 deletions
diff --git a/commits.go b/commits.go
index 3381a86..a9c98f7 100644
--- a/commits.go
+++ b/commits.go
@@ -11,18 +11,15 @@ import (
// "log"
)
-func commitToString(commit *git.Commit) string {
-
- var ret string
-
- ret += fmt.Sprintf("type: %s\n", commit.Type())
- ret += fmt.Sprintf("Id: %s\n", commit.Id())
- ret += fmt.Sprintf("Author: %s\n", commit.Author())
- ret += fmt.Sprintf("Message: %s\n", commit.Message())
- ret += fmt.Sprintf("Parent-count: %d\n", commit.ParentCount())
-
- return ret
-}
+// func commitToString(commit *git.Commit) string {
+// var ret string
+// ret += fmt.Sprintf("type: %s\n", commit.Type())
+// ret += fmt.Sprintf("Id: %s\n", commit.Id())
+// ret += fmt.Sprintf("Author: %s\n", commit.Author())
+// ret += fmt.Sprintf("Message: %s\n", commit.Message())
+// ret += fmt.Sprintf("Parent-count: %d\n", commit.ParentCount())
+// return ret
+// }
// FIXME: RETURN THE ENTITY PROVIDED BY THE CHECK, OR nil
func checkSignature(commit *git.Commit, keyring *openpgp.KeyRing) (signature, signed string, err error) {
@@ -130,7 +127,7 @@ func walkCommits(msg SCORSHmsg, w *SCORSHworker) error {
return SCORSHerr(SCORSH_ERR_NO_REPO)
}
- oldRevOid, err := git.NewOid(oldRev)
+ oldRevOid, _ := git.NewOid(oldRev)
oldrevCommit, err := repo.LookupCommit(oldRevOid)
if err != nil {
@@ -138,7 +135,7 @@ func walkCommits(msg SCORSHmsg, w *SCORSHworker) error {
return SCORSHerr(SCORSH_ERR_NO_COMMIT)
}
- newRevOid, err := git.NewOid(newRev)
+ newRevOid, _ := git.NewOid(newRev)
newrevCommit, err := repo.LookupCommit(newRevOid)
if err != nil {