Merge branch 'master' of github.com:gogits/gogs
This commit is contained in:
commit
414ebe7553
5 changed files with 49 additions and 2 deletions
|
@ -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{}
|
||||||
|
|
|
@ -711,6 +711,12 @@ html, body {
|
||||||
width: 1%;
|
width: 1%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.file-content .file-body.file-code .lines-ellipsis {
|
||||||
|
background-color: #FAFAFA;
|
||||||
|
color: #999;
|
||||||
|
width: 1%;
|
||||||
|
}
|
||||||
|
|
||||||
.file-content .file-body.file-code .lines-num span {
|
.file-content .file-body.file-code .lines-num span {
|
||||||
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
|
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
|
@ -962,6 +968,10 @@ html, body {
|
||||||
border-color: #f0db88 !important;
|
border-color: #f0db88 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.diff-file-box .ellipsis-code pre {
|
||||||
|
color: #AAA;
|
||||||
|
}
|
||||||
|
|
||||||
/* wrapper and footer */
|
/* wrapper and footer */
|
||||||
|
|
||||||
#wrapper {
|
#wrapper {
|
||||||
|
|
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()
|
||||||
|
|
|
@ -387,6 +387,36 @@
|
||||||
<pre> "github.com/youtube/vitess/go/bson"</pre>
|
<pre> "github.com/youtube/vitess/go/bson"</pre>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr class="ellipsis-code">
|
||||||
|
<td class="text-center lines-ellipsis" colspan="2">
|
||||||
|
<i class="fa fa-ellipsis-h"></i>
|
||||||
|
</td>
|
||||||
|
<td class="lines-code">
|
||||||
|
<pre> "github.com/youtube/vitess/go/bson"</pre>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="same-code nl-8 ol-10">
|
||||||
|
<td class="lines-num lines-num-old">
|
||||||
|
<span rel="L1">10</span>
|
||||||
|
</td>
|
||||||
|
<td class="lines-num lines-num-new">
|
||||||
|
<span rel="L1">8</span>
|
||||||
|
</td>
|
||||||
|
<td class="lines-code">
|
||||||
|
<pre> "github.com/youtube/vitess/go/bson"</pre>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="same-code nl-8 ol-10">
|
||||||
|
<td class="lines-num lines-num-old">
|
||||||
|
<span rel="L1">10</span>
|
||||||
|
</td>
|
||||||
|
<td class="lines-num lines-num-new">
|
||||||
|
<span rel="L1">8</span>
|
||||||
|
</td>
|
||||||
|
<td class="lines-code">
|
||||||
|
<pre> "github.com/youtube/vitess/go/bson"</pre>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
<i class="icon fa fa-file-text-o"></i>
|
<i class="icon fa fa-file-text-o"></i>
|
||||||
{{end}}{{.FileName}}
|
{{end}}{{.FileName}}
|
||||||
|
<a class="btn btn-default pull-right" href="#">Raw</a>
|
||||||
</div>
|
</div>
|
||||||
{{if .FileIsLarge}}
|
{{if .FileIsLarge}}
|
||||||
<div class="panel-footer">
|
<div class="panel-footer">
|
||||||
|
|
Reference in a new issue