summaryrefslogtreecommitdiffstats
path: root/routers/web/repo
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo')
-rw-r--r--routers/web/repo/branch.go2
-rw-r--r--routers/web/repo/issue.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/routers/web/repo/branch.go b/routers/web/repo/branch.go
index 9f26634311..ea2c01856d 100644
--- a/routers/web/repo/branch.go
+++ b/routers/web/repo/branch.go
@@ -146,7 +146,7 @@ func RestoreBranchPost(ctx *context.Context) {
// Don't return error below this
if err := repo_service.PushUpdate(
&repo_module.PushUpdateOptions{
- RefFullName: git.BranchPrefix + deletedBranch.Name,
+ RefFullName: git.RefNameFromBranch(deletedBranch.Name),
OldCommitID: git.EmptySHA,
NewCommitID: deletedBranch.Commit,
PusherID: ctx.Doer.ID,
diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go
index 1448b772bc..cbb2e20314 100644
--- a/routers/web/repo/issue.go
+++ b/routers/web/repo/issue.go
@@ -863,7 +863,7 @@ func setTemplateIfExists(ctx *context.Context, ctxDataKey string, possibleFiles
ctx.Data["HasSelectedLabel"] = len(labelIDs) > 0
ctx.Data["label_ids"] = strings.Join(labelIDs, ",")
ctx.Data["Reference"] = template.Ref
- ctx.Data["RefEndName"] = git.RefEndName(template.Ref)
+ ctx.Data["RefEndName"] = git.RefName(template.Ref).ShortName()
return templateErrs
}
return templateErrs
@@ -1883,7 +1883,7 @@ func ViewIssue(ctx *context.Context) {
ctx.Data["HasProjectsWritePermission"] = ctx.Repo.CanWrite(unit.TypeProjects)
ctx.Data["IsRepoAdmin"] = ctx.IsSigned && (ctx.Repo.IsAdmin() || ctx.Doer.IsAdmin)
ctx.Data["LockReasons"] = setting.Repository.Issue.LockReasons
- ctx.Data["RefEndName"] = git.RefEndName(issue.Ref)
+ ctx.Data["RefEndName"] = git.RefName(issue.Ref).ShortName()
ctx.Data["NewPinAllowed"] = pinAllowed
ctx.Data["PinEnabled"] = setting.Repository.Issue.MaxPinned != 0