Skip to content

Commit 3490c47

Browse files
authored
update names
Signed-off-by: wxiaoguang <[email protected]>
1 parent f9b9963 commit 3490c47

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

services/gitdiff/gitdiff.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,8 @@ func (diffFile *DiffFile) GetDiffFileName() string {
402402
return diffFile.Name
403403
}
404404

405-
// GetDiffFileName returns the short name of the diff file, or its short old name in case it was deleted
406-
func (diffFile *DiffFile) GetDiffFileShortName() string {
405+
// GetDiffFileBaseName returns the short name of the diff file, or its short old name in case it was deleted
406+
func (diffFile *DiffFile) GetDiffFileBaseName() string {
407407
if diffFile.Name == "" {
408408
return path.Base(diffFile.OldName)
409409
}

templates/repo/diff/box.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
<button class="unescape-button item" data-unicode-content-selector="#diff-{{$file.NameHash}}">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</button>
144144
<button class="escape-button tw-hidden item" data-unicode-content-selector="#diff-{{$file.NameHash}}">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
145145
{{end}}
146-
<button class="item" data-clipboard-text="{{$file.GetDiffFileShortName}}">{{ctx.Locale.Tr "copy_filename"}}</button>
146+
<button class="item" data-clipboard-text="{{$file.GetDiffFileBaseName}}">{{ctx.Locale.Tr "copy_filename"}}</button>
147147
{{if not $.PageIsWiki}}
148148
{{if $file.IsDeleted}}
149149
<a class="item" rel="nofollow" href="{{$.BeforeSourcePath}}/{{PathEscapeSegments .Name}}">{{ctx.Locale.Tr "repo.diff.view_file"}}</a>

0 commit comments

Comments
 (0)