aboutsummaryrefslogtreecommitdiffstats
path: root/repository_unix_test.go
blob: 75682ae7a8fbcefba6afd217e23a6385c9ea7671 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
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))
}