Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
67b43387f4
@ -261,6 +261,7 @@ func initRepository(f string, user *User, repo *Repository, initReadme bool, rep
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
// hook/post-update
|
// hook/post-update
|
||||||
pu, err := os.OpenFile(filepath.Join(repoPath, "hooks", "post-update"), os.O_CREATE|os.O_WRONLY, 0777)
|
pu, err := os.OpenFile(filepath.Join(repoPath, "hooks", "post-update"), os.O_CREATE|os.O_WRONLY, 0777)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -282,6 +283,7 @@ func initRepository(f string, user *User, repo *Repository, initReadme bool, rep
|
|||||||
if _, err = pu2.WriteString("#!/usr/bin/env bash\ngit update-server-info\n"); err != nil {
|
if _, err = pu2.WriteString("#!/usr/bin/env bash\ngit update-server-info\n"); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// Initialize repository according to user's choice.
|
// Initialize repository according to user's choice.
|
||||||
fileName := map[string]string{}
|
fileName := map[string]string{}
|
||||||
|
6
serve.go
6
serve.go
@ -44,6 +44,10 @@ gogs serv provide access auth for repositories`,
|
|||||||
Flags: []cli.Flag{},
|
Flags: []cli.Flag{},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
log.NewLogger(10000, "file", fmt.Sprintf(`{"filename":"%s"}`, "log/serv.log"))
|
||||||
|
}
|
||||||
|
|
||||||
func parseCmd(cmd string) (string, string) {
|
func parseCmd(cmd string) (string, string) {
|
||||||
ss := strings.SplitN(cmd, " ", 2)
|
ss := strings.SplitN(cmd, " ", 2)
|
||||||
if len(ss) != 2 {
|
if len(ss) != 2 {
|
||||||
@ -228,7 +232,7 @@ func runServ(k *cli.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if ref, ok = refs[refname]; !ok {
|
if ref, ok = refs[refname]; !ok {
|
||||||
println("unknow reference name -", refname, "-")
|
log.Trace("unknow reference name -", refname, "-", b.String())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
l, err = ref.AllCommits()
|
l, err = ref.AllCommits()
|
||||||
|
Loading…
Reference in New Issue
Block a user