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

Function TestMergeAnalysisWithSelf

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

Source from the content-addressed store, hash-verified

54}
55
56func TestMergeAnalysisWithSelf(t *testing.T) {
57 t.Parallel()
58 repo := createTestRepo(t)
59 defer cleanupTestRepo(t, repo)
60
61 seedTestRepo(t, repo)
62
63 master, err := repo.References.Lookup("refs/heads/master")
64 checkFatal(t, err)
65
66 mergeHead, err := repo.AnnotatedCommitFromRef(master)
67 checkFatal(t, err)
68
69 mergeHeads := make([]*AnnotatedCommit, 1)
70 mergeHeads[0] = mergeHead
71 a, _, err := repo.MergeAnalysis(mergeHeads)
72 checkFatal(t, err)
73
74 if a != MergeAnalysisUpToDate {
75 t.Fatalf("Expected up to date merge, not %v", a)
76 }
77}
78
79func TestMergeSameFile(t *testing.T) {
80 t.Parallel()

Callers

nothing calls this directly

Calls 7

createTestRepoFunction · 0.85
cleanupTestRepoFunction · 0.85
seedTestRepoFunction · 0.85
checkFatalFunction · 0.85
MergeAnalysisMethod · 0.80
LookupMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…