File: repository_unix_test.go

package info (click to toggle)
golang-gopkg-src-d-go-git.v4 4.11.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,900 kB
  • sloc: sh: 61; makefile: 45
file content (11 lines) | stat: -rw-r--r-- 264 bytes parent folder | download | duplicates (4)
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))
}