mirror of
https://github.com/gogs/gogs.git
synced 2025-05-24 16:30:51 +00:00
Minor fix for PR #3667
This commit is contained in:
parent
c47fbc629b
commit
16d3e7085e
@ -3,7 +3,7 @@ Gogs - Go Git Service [
|

|
||||||
|
|
||||||
##### Current tip version: 0.9.106 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions ~~or submit a task on [alpha stage automated binary building system](https://build.gogs.io/)~~)
|
##### Current tip version: 0.9.107 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions ~~or submit a task on [alpha stage automated binary building system](https://build.gogs.io/)~~)
|
||||||
|
|
||||||
| Web | UI | Preview |
|
| Web | UI | Preview |
|
||||||
|:-------------:|:-------:|:-------:|
|
|:-------------:|:-------:|:-------:|
|
||||||
|
2
gogs.go
2
gogs.go
@ -17,7 +17,7 @@ import (
|
|||||||
"github.com/gogits/gogs/modules/setting"
|
"github.com/gogits/gogs/modules/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
const APP_VER = "0.9.106.1222"
|
const APP_VER = "0.9.107.1222"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
|
File diff suppressed because one or more lines are too long
@ -118,7 +118,7 @@ var (
|
|||||||
MirrorQueueLength int
|
MirrorQueueLength int
|
||||||
PullRequestQueueLength int
|
PullRequestQueueLength int
|
||||||
PreferredLicenses []string
|
PreferredLicenses []string
|
||||||
DisableHTTPGit bool
|
DisableHTTPGit bool `ini:"DISABLE_HTTP_GIT"`
|
||||||
|
|
||||||
// Repository editor settings
|
// Repository editor settings
|
||||||
Editor struct {
|
Editor struct {
|
||||||
@ -495,7 +495,6 @@ func NewContext() {
|
|||||||
|
|
||||||
// Determine and create root git repository path.
|
// Determine and create root git repository path.
|
||||||
sec = Cfg.Section("repository")
|
sec = Cfg.Section("repository")
|
||||||
Repository.DisableHTTPGit = sec.Key("DISABLE_HTTP_GIT").MustBool()
|
|
||||||
RepoRootPath = sec.Key("ROOT").MustString(path.Join(homeDir, "gogs-repositories"))
|
RepoRootPath = sec.Key("ROOT").MustString(path.Join(homeDir, "gogs-repositories"))
|
||||||
forcePathSeparator(RepoRootPath)
|
forcePathSeparator(RepoRootPath)
|
||||||
if !filepath.IsAbs(RepoRootPath) {
|
if !filepath.IsAbs(RepoRootPath) {
|
||||||
|
@ -484,6 +484,7 @@ func HTTPBackend(ctx *context.Context, cfg *serviceConfig) http.HandlerFunc {
|
|||||||
w.Write([]byte("Interacting with repositories by HTTP protocol is not allowed"))
|
w.Write([]byte("Interacting with repositories by HTTP protocol is not allowed"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if route.method != r.Method {
|
if route.method != r.Method {
|
||||||
if r.Proto == "HTTP/1.1" {
|
if r.Proto == "HTTP/1.1" {
|
||||||
w.WriteHeader(http.StatusMethodNotAllowed)
|
w.WriteHeader(http.StatusMethodNotAllowed)
|
||||||
|
@ -1 +1 @@
|
|||||||
0.9.106.1222
|
0.9.107.1222
|
@ -26,11 +26,7 @@
|
|||||||
SSH
|
SSH
|
||||||
</button>
|
</button>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if not $.DisableHTTP}}
|
<input id="repo-clone-url" value="{{if not $.DisableHTTP}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly>
|
||||||
<input id="repo-clone-url" value="{{$.CloneLink.HTTPS}}" readonly>
|
|
||||||
{{else}}
|
|
||||||
<input id="repo-clone-url" value="{{$.CloneLink.SSH}}" readonly>
|
|
||||||
{{end}}
|
|
||||||
<button class="ui basic button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
|
<button class="ui basic button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
|
||||||
<i class="octicon octicon-clippy"></i>
|
<i class="octicon octicon-clippy"></i>
|
||||||
</button>
|
</button>
|
||||||
|
@ -61,11 +61,7 @@
|
|||||||
SSH
|
SSH
|
||||||
</button>
|
</button>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if not $.DisableHTTP}}
|
<input id="repo-clone-url" value="{{if not $.DisableHTTP}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly>
|
||||||
<input id="repo-clone-url" value="{{$.CloneLink.HTTPS}}" readonly>
|
|
||||||
{{else}}
|
|
||||||
<input id="repo-clone-url" value="{{$.CloneLink.SSH}}" readonly>
|
|
||||||
{{end}}
|
|
||||||
<button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
|
<button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
|
||||||
<i class="octicon octicon-clippy"></i>
|
<i class="octicon octicon-clippy"></i>
|
||||||
</button>
|
</button>
|
||||||
|
@ -39,11 +39,7 @@
|
|||||||
SSH
|
SSH
|
||||||
</button>
|
</button>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if not $.DisableHTTP}}
|
<input id="repo-clone-url" value="{{if not $.DisableHTTP}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly>
|
||||||
<input id="repo-clone-url" value="{{$.WikiCloneLink.HTTPS}}" readonly>
|
|
||||||
{{else}}
|
|
||||||
<input id="repo-clone-url" value="{{$.WikiCloneLink.SSH}}" readonly>
|
|
||||||
{{end}}
|
|
||||||
<button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
|
<button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
|
||||||
<i class="octicon octicon-clippy"></i>
|
<i class="octicon octicon-clippy"></i>
|
||||||
</button>
|
</button>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user