MCPcopy Create free account
hub / github.com/dirk/quickhook / writeCommitEditMsg

Function writeCommitEditMsg

hooks/commit_msg_test.go:20–25  ·  view source on GitHub ↗
(t *testing.T, data string)

Source from the content-addressed store, hash-verified

18}
19
20func writeCommitEditMsg(t *testing.T, data string) string {
21 name := path.Join(t.TempDir(), "COMMIT_EDITMSG")
22 err := os.WriteFile(name, []byte(data), 0644)
23 require.NoError(t, err)
24 return name
25}
26
27func TestHookMutatesCommitMsg(t *testing.T) {
28 tempDir := initGitForCommitMsg(t)

Callers 2

TestHookMutatesCommitMsgFunction · 0.85
TestFailingHookFunction · 0.85

Calls 1

WriteFileMethod · 0.80

Tested by

no test coverage detected