mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-09 18:59:12 -06:00
expose commit parent refs (#1963)
* expose commit parent refs * no need for ctx * adding commentt
This commit is contained in:
@@ -131,6 +131,11 @@ func (c *Commit) GetCommitMeta() (*CommitMeta, error) {
|
||||
return nil, errors.New(h.String() + " is a commit without the required metadata.")
|
||||
}
|
||||
|
||||
// ParentRefs returns the noms types.Refs for the commits
|
||||
func (c *Commit) ParentRefs() []types.Ref {
|
||||
return c.parents
|
||||
}
|
||||
|
||||
// ParentHashes returns the commit hashes for all parent commits.
|
||||
func (c *Commit) ParentHashes(ctx context.Context) ([]hash.Hash, error) {
|
||||
hashes := make([]hash.Hash, len(c.parents))
|
||||
|
||||
Reference in New Issue
Block a user