lfs/setup: move newlines around in git lfs update --manual
This commit is contained in:
parent
0564f00fcf
commit
3c509cf1f9
13
lfs/setup.go
13
lfs/setup.go
@ -1,8 +1,8 @@
|
||||
package lfs
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/git-lfs/git-lfs/tools"
|
||||
)
|
||||
@ -61,13 +61,14 @@ var (
|
||||
|
||||
// Get user-readable manual install steps for hooks
|
||||
func GetHookInstallSteps() string {
|
||||
var buf bytes.Buffer
|
||||
steps := make([]string, 0, len(hooks))
|
||||
for _, h := range hooks {
|
||||
buf.WriteString(fmt.Sprintf("Add the following to .git/hooks/%s :\n\n", h.Type))
|
||||
buf.WriteString(tools.Indent(h.Contents))
|
||||
buf.WriteString("\n")
|
||||
steps = append(steps, fmt.Sprintf(
|
||||
"Add the following to .git/hooks/%s :\n%s",
|
||||
h.Type, tools.Indent(h.Contents)))
|
||||
}
|
||||
return buf.String()
|
||||
|
||||
return strings.Join(steps, "\n\n")
|
||||
}
|
||||
|
||||
// InstallHooks installs all hooks in the `hooks` var.
|
||||
|
Loading…
Reference in New Issue
Block a user