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

Function TestMergeBase

merge_test.go:160–174  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

158}
159
160func TestMergeBase(t *testing.T) {
161 t.Parallel()
162 repo := createTestRepo(t)
163 defer cleanupTestRepo(t, repo)
164
165 commitAId, _ := seedTestRepo(t, repo)
166 commitBId, _ := appendCommit(t, repo)
167
168 mergeBase, err := repo.MergeBase(commitAId, commitBId)
169 checkFatal(t, err)
170
171 if mergeBase.Cmp(commitAId) != 0 {
172 t.Fatalf("unexpected merge base")
173 }
174}
175
176func TestMergeBases(t *testing.T) {
177 t.Parallel()

Callers

nothing calls this directly

Calls 7

createTestRepoFunction · 0.85
cleanupTestRepoFunction · 0.85
seedTestRepoFunction · 0.85
appendCommitFunction · 0.85
checkFatalFunction · 0.85
MergeBaseMethod · 0.80
CmpMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…