mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-23 21:53:09 +02:00
Remove the internal GitInfo type and make Page.GitInf() return a pointer
See #5693
This commit is contained in:
@@ -230,13 +230,13 @@ func (h *HugoSites) RegularPages() page.Pages {
|
||||
return v
|
||||
}
|
||||
|
||||
func (h *HugoSites) gitInfoForPage(p page.Page) (source.GitInfo, error) {
|
||||
func (h *HugoSites) gitInfoForPage(p page.Page) (*source.GitInfo, error) {
|
||||
if _, err := h.init.gitInfo.Do(context.Background()); err != nil {
|
||||
return source.GitInfo{}, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if h.gitInfo == nil {
|
||||
return source.GitInfo{}, nil
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
return h.gitInfo.forPage(p), nil
|
||||
|
Reference in New Issue
Block a user