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

Function headCommit

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

Source from the content-addressed store, hash-verified

442}
443
444func headCommit(repo *Repository) (*Commit, error) {
445 head, err := repo.Head()
446 if err != nil {
447 return nil, err
448 }
449 defer head.Free()
450
451 commit, err := repo.LookupCommit(head.Target())
452 if err != nil {
453 return nil, err
454 }
455
456 return commit, nil
457}
458
459func headTree(repo *Repository) (*Tree, error) {
460 headCommit, err := headCommit(repo)

Callers 6

checkAllCommitsSignedFunction · 0.85
createBranchFunction · 0.85
headTreeFunction · 0.85
commitSomethingFunction · 0.85
commitMsgsListFunction · 0.85
addAndGetTreeFunction · 0.85

Calls 4

HeadMethod · 0.80
LookupCommitMethod · 0.80
FreeMethod · 0.65
TargetMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…