summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2014-03-26 00:00:36 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2014-03-26 00:00:36 +0800
commit9b509054cf8ef8e15cf567614aef46fe12571904 (patch)
tree7ff242e1a253210b851437b5062de6149a4d1b49 /models
parent20ec459b93a68c8bf4b32fafc0532b569f5e1c5e (diff)
downloadgitea-9b509054cf8ef8e15cf567614aef46fe12571904.tar.gz
gitea-9b509054cf8ef8e15cf567614aef46fe12571904.zip
bug fixed
Diffstat (limited to 'models')
-rw-r--r--models/repo.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/models/repo.go b/models/repo.go
index d5f9be72ac..9e469952e3 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -261,7 +261,6 @@ func initRepository(f string, user *User, repo *Repository, initReadme bool, rep
return err
}
- /*
// hook/post-update
pu, err := os.OpenFile(filepath.Join(repoPath, "hooks", "post-update"), os.O_CREATE|os.O_WRONLY, 0777)
if err != nil {
@@ -269,11 +268,11 @@ func initRepository(f string, user *User, repo *Repository, initReadme bool, rep
}
defer pu.Close()
// TODO: Windows .bat
- if _, err = pu.WriteString(fmt.Sprintf("#!/usr/bin/env bash\n%s update\n", appPath)); err != nil {
+ if _, err = pu.WriteString(fmt.Sprintf("#!/usr/bin/env bash\n%s update ARGV[0] ARGV[1] ARGV[2]\n", appPath)); err != nil {
return err
}
- // hook/post-update
+ /*// hook/post-update
pu2, err := os.OpenFile(filepath.Join(repoPath, "hooks", "post-receive"), os.O_CREATE|os.O_WRONLY, 0777)
if err != nil {
return err