File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,14 +24,18 @@ import (
2424//
2525// .GitHome: the path to Git's home directory.
2626const preReceiveHookTplStr = `#!/bin/bash
27+ strip_remote_prefix() {
28+ stdbuf -i0 -o0 -e0 sed "s/^/"$'\e[1G'"/"
29+ }
30+
2731GIT_HOME={{.GitHome}} \
2832SSH_CONNECTION="$SSH_CONNECTION" \
2933SSH_ORIGINAL_COMMAND="$SSH_ORIGINAL_COMMAND" \
3034REPOSITORY="$RECEIVE_REPO" \
3135USERNAME="$RECEIVE_USER" \
3236FINGERPRINT="$RECEIVE_FINGERPRINT" \
3337POD_NAMESPACE="$POD_NAMESPACE" \
34- boot git-receive
38+ boot git-receive | strip_remote_prefix
3539`
3640
3741var preReceiveHookTpl = template .Must (template .New ("hooks" ).Parse (preReceiveHookTplStr ))
Original file line number Diff line number Diff line change @@ -40,8 +40,8 @@ func Err(format string, v ...interface{}) {
4040
4141// Info prints a green-tinted message.
4242func Info (format string , v ... interface {}) {
43- fmt .Fprint (Stderr , "---> " )
44- fmt .Fprintf (Stderr , appendNewLine (format ), v ... )
43+ fmt .Fprint (Stdout , "---> " )
44+ fmt .Fprintf (Stdout , appendNewLine (format ), v ... )
4545}
4646
4747// Debug prints a cyan-tinted message if IsDebugging is true.
You can’t perform that action at this time.
0 commit comments