From 3005c4f6db725e0e637987d3ac154865526c1363 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sat, 11 Oct 2014 18:20:07 -0400 Subject: Fix diff css style, hooks \r char --- modules/git/hooks.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/git/hooks.go') diff --git a/modules/git/hooks.go b/modules/git/hooks.go index b8d15e5e..5b3c88a9 100644 --- a/modules/git/hooks.go +++ b/modules/git/hooks.go @@ -83,7 +83,7 @@ func (h *Hook) Update() error { if len(strings.TrimSpace(h.Content)) == 0 { return os.Remove(h.path) } - return ioutil.WriteFile(h.path, []byte(h.Content), os.ModePerm) + return ioutil.WriteFile(h.path, []byte(strings.Replace(h.Content, "\r", "", -1)), os.ModePerm) } // ListHooks returns a list of Git hooks of given repository. -- cgit v1.2.3