aboutsummaryrefslogtreecommitdiffstats
path: root/repository_unix_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-09-01 17:28:42 +0200
committerGitHub <noreply@github.com>2017-09-01 17:28:42 +0200
commitc20028f6a4d0038d59898392aafe13baa9e84040 (patch)
tree49407f8b3b5aaef1c6a56363bdb1fc25cd56f5cb /repository_unix_test.go
parent8ce9f5f240730ce21f50e42409d17fac7d71e051 (diff)
parent76efca13092ba245caf15f232f467e68fa1f73ed (diff)
downloadgo-git-c20028f6a4d0038d59898392aafe13baa9e84040.tar.gz
Merge pull request #573 from orirawlings/pushSideband
Add sideband support for push
Diffstat (limited to 'repository_unix_test.go')
-rw-r--r--repository_unix_test.go11
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))
+}