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

Function TestMergeBasesMany

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

Source from the content-addressed store, hash-verified

210}
211
212func TestMergeBasesMany(t *testing.T) {
213 t.Parallel()
214 repo := createTestRepo(t)
215 defer cleanupTestRepo(t, repo)
216
217 commitAId, _ := seedTestRepo(t, repo)
218 commitBId, _ := appendCommit(t, repo)
219
220 mergeBases, err := repo.MergeBasesMany([]*Oid{commitAId, commitBId})
221 checkFatal(t, err)
222
223 if len(mergeBases) != 1 {
224 t.Fatalf("expected merge bases len to be 1, got %v", len(mergeBases))
225 }
226
227 if mergeBases[0].Cmp(commitAId) != 0 {
228 t.Fatalf("unexpected merge base")
229 }
230}
231
232func TestMergeBaseOctopus(t *testing.T) {
233 t.Parallel()

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…