summaryrefslogtreecommitdiffstats
path: root/modules/git
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-10-11 18:20:07 -0400
committerUnknwon <joe2010xtmf@163.com>2014-10-11 18:20:07 -0400
commit3005c4f6db725e0e637987d3ac154865526c1363 (patch)
treed42a32a32c8f15958aac7e3bf6e8ae54dc43f588 /modules/git
parent963354c5d7e78eb9fed447ab9b9984420573649c (diff)
downloadgitea-3005c4f6db725e0e637987d3ac154865526c1363.tar.gz
gitea-3005c4f6db725e0e637987d3ac154865526c1363.zip
Fix diff css style, hooks \r char
Diffstat (limited to 'modules/git')
-rw-r--r--modules/git/hooks.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/git/hooks.go b/modules/git/hooks.go
index b8d15e5e75..5b3c88a931 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.