mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-01 05:36:19 +01:00
parent
fd4b123e88
commit
605a38759f
2 changed files with 5 additions and 5 deletions
|
@ -68,7 +68,7 @@ func parseCmd(cmd string) (string, string) {
|
||||||
args = ss[1]
|
args = ss[1]
|
||||||
verb = fmt.Sprintf("%s %s", verb, ss[0])
|
verb = fmt.Sprintf("%s %s", verb, ss[0])
|
||||||
}
|
}
|
||||||
return verb, args
|
return verb, strings.Replace(args, "'/", "'", 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
func In(b string, sl map[string]int) bool {
|
func In(b string, sl map[string]int) bool {
|
||||||
|
@ -128,7 +128,7 @@ func runServ(k *cli.Context) {
|
||||||
repoUser, err := models.GetUserByName(repoUserName)
|
repoUser, err := models.GetUserByName(repoUserName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
println("You have no right to access")
|
println("You have no right to access")
|
||||||
qlog.Fatal("Get user failed", err)
|
qlog.Fatalf("Get user failed: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// access check
|
// access check
|
||||||
|
|
|
@ -153,11 +153,11 @@ func RepoAssignment(redirect bool, args ...bool) martini.Handler {
|
||||||
ctx.Data["IsRepositoryOwner"] = ctx.Repo.IsOwner
|
ctx.Data["IsRepositoryOwner"] = ctx.Repo.IsOwner
|
||||||
ctx.Data["BranchName"] = ""
|
ctx.Data["BranchName"] = ""
|
||||||
|
|
||||||
sshPrefix := ""
|
|
||||||
if base.SshPort != 22 {
|
if base.SshPort != 22 {
|
||||||
sshPrefix = "ssh://"
|
ctx.Repo.CloneLink.SSH = fmt.Sprintf("ssh://%s@%s/%s/%s.git", base.RunUser, base.Domain, user.LowerName, repo.LowerName)
|
||||||
|
} else {
|
||||||
|
ctx.Repo.CloneLink.SSH = fmt.Sprintf("%s@%s:%s/%s.git", base.RunUser, base.Domain, user.LowerName, repo.LowerName)
|
||||||
}
|
}
|
||||||
ctx.Repo.CloneLink.SSH = fmt.Sprintf("%s%s@%s:%s/%s.git", sshPrefix, base.RunUser, base.Domain, user.LowerName, repo.LowerName)
|
|
||||||
ctx.Repo.CloneLink.HTTPS = fmt.Sprintf("%s%s/%s.git", base.AppUrl, user.LowerName, repo.LowerName)
|
ctx.Repo.CloneLink.HTTPS = fmt.Sprintf("%s%s/%s.git", base.AppUrl, user.LowerName, repo.LowerName)
|
||||||
ctx.Data["CloneLink"] = ctx.Repo.CloneLink
|
ctx.Data["CloneLink"] = ctx.Repo.CloneLink
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue