From 9b509054cf8ef8e15cf567614aef46fe12571904 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 26 Mar 2014 00:00:36 +0800 Subject: bug fixed --- models/repo.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'models') 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 -- cgit v1.2.3