lfs/setup: move newlines around in git lfs update --manual

This commit is contained in:
Taylor Blau 2017-07-11 10:20:13 -06:00
parent 0564f00fcf
commit 3c509cf1f9

@ -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.