Skip to content

Commit fb3d4f7

Browse files
committed
Make Signature type alias for object.Signature in go-git.
Signed-off-by: Filip Navara <[email protected]>
1 parent 664b5d9 commit fb3d4f7

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

modules/git/commit_info.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ func (tes Entries) GetCommitsInfo(commit *Commit, treePath string, cache LastCom
4444
}
4545

4646
func convertCommit(c *object.Commit) *Commit {
47-
commiter := Signature(c.Committer)
48-
author := Signature(c.Author)
49-
5047
var pgpSignaure *CommitGPGSignature
5148
if c.PGPSignature != "" {
5249
pgpSignaure = &CommitGPGSignature{
@@ -58,8 +55,8 @@ func convertCommit(c *object.Commit) *Commit {
5855
return &Commit{
5956
ID: c.Hash,
6057
CommitMessage: c.Message,
61-
Committer: &commiter,
62-
Author: &author,
58+
Committer: &c.Committer,
59+
Author: &c.Author,
6360
Signature: pgpSignaure,
6461
parents: c.ParentHashes,
6562
}

modules/git/signature.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
)
1414

1515
// Signature represents the Author or Committer information.
16-
type Signature object.Signature
16+
type Signature = object.Signature
1717

1818
const (
1919
// GitTimeLayout is the (default) time layout used by git.

0 commit comments

Comments
 (0)