|
|
@ -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 { |
|
|
@ -227,7 +231,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() |
|
|
|