Fix the wrong default branch name displayed by checkout (#25777)

Related: #22743

Before:

![image](https://github.com/go-gitea/gitea/assets/89133723/3cec886c-589c-41a8-86af-a08b62b8adef)

After:

![image](https://github.com/go-gitea/gitea/assets/89133723/74ee8adf-fca7-42a0-a67a-ecaa0ba91b4a)
This commit is contained in:
hiifong 2023-07-09 17:09:06 +08:00 committed by GitHub
parent f8bb1018ae
commit d58096ec31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@
{{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}}
<button class="btn interact-bg show-create-branch-modal gt-p-3"
data-modal="#create-branch-modal"
data-branch-from="{{$.DefaultBranchBranch}}"
data-branch-from="{{$.DefaultBranchBranch.DBBranch.Name}}"
data-branch-from-urlcomponent="{{PathEscapeSegments $.DefaultBranchBranch.DBBranch.Name}}"
data-tooltip-content="{{$.locale.Tr "repo.branch.new_branch_from" ($.DefaultBranchBranch.DBBranch.Name)}}"
>