1package types
2
3import (
4 "time"
5
6 "github.com/go-git/go-git/v5/plumbing"
7)
8
9// A nicer git tree representation.
10type NiceTree struct {
11 // Relative path
12 Name string `json:"name"`
13 Mode string `json:"mode"`
14 Size int64 `json:"size"`
15 IsFile bool `json:"is_file"`
16 IsSubtree bool `json:"is_subtree"`
17
18 LastCommit *LastCommitInfo `json:"last_commit,omitempty"`
19}
20
21type LastCommitInfo struct {
22 Hash plumbing.Hash
23 Message string
24 When time.Time
25}