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

Function TestAnnotatedCommitFromRevspec

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

Source from the content-addressed store, hash-verified

6)
7
8func TestAnnotatedCommitFromRevspec(t *testing.T) {
9 t.Parallel()
10 repo := createTestRepo(t)
11 defer cleanupTestRepo(t, repo)
12
13 seedTestRepo(t, repo)
14
15 mergeHead, err := repo.AnnotatedCommitFromRevspec("refs/heads/master")
16 checkFatal(t, err)
17
18 expectedId := "473bf778b67b6d53e2ab289e0f1a2e8addef2fc2"
19 if mergeHead.Id().String() != expectedId {
20 t.Errorf("mergeHead.Id() = %v, want %v", mergeHead.Id(), expectedId)
21 }
22}
23
24func TestMergeWithSelf(t *testing.T) {
25 t.Parallel()

Callers

nothing calls this directly

Calls 7

createTestRepoFunction · 0.85
cleanupTestRepoFunction · 0.85
seedTestRepoFunction · 0.85
checkFatalFunction · 0.85
StringMethod · 0.45
IdMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…