pull/32721/head
Lunny Xiao 4 weeks ago
parent 67a749f52c
commit ab98bfba9d
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A

@ -56,7 +56,15 @@ func isExcludedEntry(entry *git.TreeEntry) bool {
func Tree(ctx *context.Context) {
treePath := ctx.PathParam("*")
refFullName := git.RefName("refs/" + ctx.FormTrim("ref"))
var refFullName git.RefName
switch ctx.FormTrim("ref_type") {
case "branch":
refFullName = git.RefNameFromBranch(ctx.FormTrim("ref_name"))
case "tag":
refFullName = git.RefNameFromTag(ctx.FormTrim("ref_name"))
default:
refFullName = git.RefName(ctx.FormTrim("ref_name"))
}
recursive := ctx.FormBool("recursive")
var results []*files_service.TreeViewNode

Loading…
Cancel
Save