diff options
Diffstat (limited to 'repository_unix_test.go')
-rw-r--r-- | repository_unix_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/repository_unix_test.go b/repository_unix_test.go new file mode 100644 index 0000000..75682ae --- /dev/null +++ b/repository_unix_test.go @@ -0,0 +1,11 @@ +// +build !plan9,!windows + +package git + +import "fmt" + +// preReceiveHook returns the bytes of a pre-receive hook script +// that prints m before exiting successfully +func preReceiveHook(m string) []byte { + return []byte(fmt.Sprintf("#!/bin/sh\nprintf '%s'\n", m)) +} |