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

Function createBranch

rebase_test.go:422–434  ·  view source on GitHub ↗
(repo *Repository, branch string)

Source from the content-addressed store, hash-verified

420}
421
422func createBranch(repo *Repository, branch string) error {
423 commit, err := headCommit(repo)
424 if err != nil {
425 return err
426 }
427 defer commit.Free()
428 _, err = repo.CreateBranch(branch, commit, false)
429 if err != nil {
430 return err
431 }
432
433 return nil
434}
435
436func signature() *Signature {
437 return &Signature{

Callers 2

setupRepoForRebaseFunction · 0.85

Calls 3

headCommitFunction · 0.85
CreateBranchMethod · 0.80
FreeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…