diff options
Diffstat (limited to 'source/fileInfo.go')
-rw-r--r-- | source/fileInfo.go | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/source/fileInfo.go b/source/fileInfo.go index dfa5cda26..fff78e2fe 100644 --- a/source/fileInfo.go +++ b/source/fileInfo.go @@ -16,7 +16,6 @@ package source import ( "path/filepath" "sync" - "time" "github.com/bep/gitmap" "github.com/gohugoio/hugo/common/hashing" @@ -154,32 +153,5 @@ func NewFileInfo(fi hugofs.FileMetaInfo) *File { } } -func NewGitInfo(info gitmap.GitInfo) GitInfo { - return GitInfo(info) -} - // GitInfo provides information about a version controlled source file. -type GitInfo struct { - // Commit hash. - Hash string `json:"hash"` - // Abbreviated commit hash. - AbbreviatedHash string `json:"abbreviatedHash"` - // The commit message's subject/title line. - Subject string `json:"subject"` - // The author name, respecting .mailmap. - AuthorName string `json:"authorName"` - // The author email address, respecting .mailmap. - AuthorEmail string `json:"authorEmail"` - // The author date. - AuthorDate time.Time `json:"authorDate"` - // The commit date. - CommitDate time.Time `json:"commitDate"` - // The commit message's body. - Body string `json:"body"` -} - -// IsZero returns true if the GitInfo is empty, -// meaning it will also be falsy in the Go templates. -func (g GitInfo) IsZero() bool { - return g.Hash == "" -} +type GitInfo = gitmap.GitInfo |