func (s *DiffTreeSuite) commitFromStorer(c *C, sto storer.EncodedObjectStorer, h plumbing.Hash) *object.Commit { commit, err := object.GetCommit(sto, h) c.Assert(err, IsNil) return commit }
func commitsToPush(s storer.EncodedObjectStorer, commands []*packp.Command) ([]*object.Commit, error) { var commits []*object.Commit for _, cmd := range commands { if cmd.New == plumbing.ZeroHash { continue } c, err := object.GetCommit(s, cmd.New) if err != nil { return nil, err } commits = append(commits, c) } return commits, nil }
func (s *RevListSuite) commit(c *C, h plumbing.Hash) *object.Commit { commit, err := object.GetCommit(s.Storer, h) c.Assert(err, IsNil) return commit }