aboutsummaryrefslogtreecommitdiff
path: root/modules/git/repo_commit_gogit.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/git/repo_commit_gogit.go')
-rw-r--r--modules/git/repo_commit_gogit.go39
1 files changed, 0 insertions, 39 deletions
diff --git a/modules/git/repo_commit_gogit.go b/modules/git/repo_commit_gogit.go
index 72de158e6..ce0af9361 100644
--- a/modules/git/repo_commit_gogit.go
+++ b/modules/git/repo_commit_gogit.go
@@ -7,7 +7,6 @@
package git
import (
- "fmt"
"strings"
"github.com/go-git/go-git/v5/plumbing"
@@ -67,38 +66,6 @@ func (repo *Repository) IsCommitExist(name string) bool {
return err == nil
}
-func convertPGPSignatureForTag(t *object.Tag) *CommitGPGSignature {
- if t.PGPSignature == "" {
- return nil
- }
-
- var w strings.Builder
- var err error
-
- if _, err = fmt.Fprintf(&w,
- "object %s\ntype %s\ntag %s\ntagger ",
- t.Target.String(), t.TargetType.Bytes(), t.Name); err != nil {
- return nil
- }
-
- if err = t.Tagger.Encode(&w); err != nil {
- return nil
- }
-
- if _, err = fmt.Fprintf(&w, "\n\n"); err != nil {
- return nil
- }
-
- if _, err = fmt.Fprintf(&w, t.Message); err != nil {
- return nil
- }
-
- return &CommitGPGSignature{
- Signature: t.PGPSignature,
- Payload: strings.TrimSpace(w.String()) + "\n",
- }
-}
-
func (repo *Repository) getCommit(id SHA1) (*Commit, error) {
var tagObject *object.Tag
@@ -122,12 +89,6 @@ func (repo *Repository) getCommit(id SHA1) (*Commit, error) {
commit := convertCommit(gogitCommit)
commit.repo = repo
- if tagObject != nil {
- commit.CommitMessage = strings.TrimSpace(tagObject.Message)
- commit.Author = &tagObject.Tagger
- commit.Signature = convertPGPSignatureForTag(tagObject)
- }
-
tree, err := gogitCommit.Tree()
if err != nil {
return nil, err