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

Function createTestNote

note_test.go:102–117  ·  view source on GitHub ↗
(t *testing.T, repo *Repository, commit *Commit)

Source from the content-addressed store, hash-verified

100}
101
102func createTestNote(t *testing.T, repo *Repository, commit *Commit) (*Note, *Oid) {
103 loc, err := time.LoadLocation("Europe/Berlin")
104 sig := &Signature{
105 Name: "alice",
106 Email: "alice@example.com",
107 When: time.Date(2015, 01, 05, 13, 0, 0, 0, loc),
108 }
109
110 noteId, err := repo.Notes.Create("", sig, sig, commit.Id(), "I am a note\n", false)
111 checkFatal(t, err)
112
113 note, err := repo.Notes.Read("", commit.Id())
114 checkFatal(t, err)
115
116 return note, noteId
117}

Callers 3

TestCreateNoteFunction · 0.85
TestNoteIteratorFunction · 0.85
TestRemoveNoteFunction · 0.85

Calls 4

checkFatalFunction · 0.85
CreateMethod · 0.45
IdMethod · 0.45
ReadMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…