()
| 48 | } |
| 49 | |
| 50 | func (p *Project) Head() (map[string]*pb.Document, error) { |
| 51 | commit, err := p.headCommit() |
| 52 | if err != nil { |
| 53 | return nil, fmt.Errorf("could not retrieve head: %v", err) |
| 54 | } |
| 55 | |
| 56 | tree, err := commit.Tree() |
| 57 | if err != nil { |
| 58 | return nil, fmt.Errorf("couldn't get tree for HEAD: %v", err) |
| 59 | } |
| 60 | |
| 61 | return p.mapFromTree(tree) |
| 62 | } |
| 63 | |
| 64 | func (p *Project) ResolveCommit(revision string) (map[string]*pb.Document, error) { |
| 65 | gitObj, err := p.repo.RevparseSingle(revision) |
no test coverage detected