Przeglądaj źródła

routers/repo/branch: fix can't delete branch with slashes after merge (#4089)

Unknwon 8 lat temu
rodzic
commit
074c92b0a3
6 zmienionych plików z 5 dodań i 5 usunięć
  1. 1 1
      cmd/web.go
  2. 1 1
      gogs.go
  3. 0 0
      modules/bindata/bindata.go
  4. 1 1
      routers/repo/branch.go
  5. 1 1
      routers/repo/issue.go
  6. 1 1
      templates/.VERSION

+ 1 - 1
cmd/web.go

@@ -570,7 +570,7 @@ func runWeb(ctx *cli.Context) error {
 		}, context.RepoRef())
 
 		// m.Get("/branches", repo.Branches)
-		m.Post("/branches/:name/delete", reqSignIn, reqRepoWriter, repo.DeleteBranchPost)
+		m.Post("/branches/delete/*", reqSignIn, reqRepoWriter, repo.DeleteBranchPost)
 
 		m.Group("/wiki", func() {
 			m.Get("/?:page", repo.Wiki)

+ 1 - 1
gogs.go

@@ -16,7 +16,7 @@ import (
 	"github.com/gogits/gogs/modules/setting"
 )
 
-const APP_VER = "0.9.135.0209"
+const APP_VER = "0.9.136.0209"
 
 func init() {
 	setting.AppVer = APP_VER

Plik diff jest za duży
+ 0 - 0
modules/bindata/bindata.go


+ 1 - 1
routers/repo/branch.go

@@ -34,7 +34,7 @@ func Branches(ctx *context.Context) {
 }
 
 func DeleteBranchPost(ctx *context.Context) {
-	branchName := ctx.Params(":name")
+	branchName := ctx.Params("*")
 	commitID := ctx.Query("commit")
 
 	defer func() {

+ 1 - 1
routers/repo/issue.go

@@ -639,7 +639,7 @@ func ViewIssue(ctx *context.Context) {
 		ctx.Data["IsPullBranchDeletable"] = pull.BaseRepoID == pull.HeadRepoID &&
 			ctx.Repo.IsWriter() && ctx.Repo.GitRepo.IsBranchExist(pull.HeadBranch)
 
-		deleteBranchUrl := ctx.Repo.RepoLink + "/branches/" + pull.HeadBranch + "/delete"
+		deleteBranchUrl := ctx.Repo.RepoLink + "/branches/delete/" + pull.HeadBranch
 		ctx.Data["DeleteBranchLink"] = fmt.Sprintf("%s?commit=%s&redirect_to=%s", deleteBranchUrl, pull.MergedCommitID, ctx.Data["Link"])
 	}
 

+ 1 - 1
templates/.VERSION

@@ -1 +1 @@
-0.9.135.0209
+0.9.136.0209

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików