MCPcopy Create free account
hub / github.com/libgit2/git2go / commitMsgsList

Function commitMsgsList

rebase_test.go:570–590  ·  view source on GitHub ↗
(repo *Repository)

Source from the content-addressed store, hash-verified

568}
569
570func commitMsgsList(repo *Repository) ([]string, error) {
571 head, err := headCommit(repo)
572 if err != nil {
573 return nil, err
574 }
575 defer head.Free()
576
577 var commits []string
578
579 parent := head.Parent(0)
580 defer parent.Free()
581 commits = append(commits, head.Message(), parent.Message())
582
583 for parent.ParentCount() != 0 {
584 parent = parent.Parent(0)
585 defer parent.Free()
586 commits = append(commits, parent.Message())
587 }
588
589 return commits, nil
590}
591
592func assertStringList(t *testing.T, expected, actual []string) {
593 if len(expected) != len(actual) {

Callers 3

TestRebaseAbortFunction · 0.85
TestRebaseNoConflictsFunction · 0.85
TestRebaseGpgSignedFunction · 0.85

Calls 5

headCommitFunction · 0.85
ParentMethod · 0.80
ParentCountMethod · 0.80
FreeMethod · 0.65
MessageMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…