mirror of
https://github.com/go-gitea/gitea.git
synced 2024-09-01 14:56:30 +00:00
Backport #15338 More recent versions of git have increased support for detection of renames meaning that a rename with diff changes is now supported. Although ParsePatch supports this - our templates do not and the simplest solution is simply to show the diff. Fix #15335 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
parent
223dddb29e
commit
62fbca3af4
@ -57,14 +57,12 @@
|
||||
<div class="diff-file-box diff-box file-content">
|
||||
<h4 class="ui top attached normal header rounded">
|
||||
<div class="diff-counter count ui left">
|
||||
{{if not $file.IsRenamed}}
|
||||
<span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span>
|
||||
<span class="bar">
|
||||
<div class="pull-left add"></div>
|
||||
<div class="pull-left del"></div>
|
||||
</span>
|
||||
<span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<span class="file">{{$file.Name}}</span>
|
||||
<div>{{$.i18n.Tr "repo.diff.file_suppressed"}}</div>
|
||||
@ -97,7 +95,7 @@
|
||||
<div class="diff-counter count">
|
||||
{{if $file.IsBin}}
|
||||
{{$.i18n.Tr "repo.diff.bin"}}
|
||||
{{else if not $file.IsRenamed}}
|
||||
{{else}}
|
||||
<span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span>
|
||||
<span class="bar">
|
||||
<div class="pull-left add"></div>
|
||||
@ -119,7 +117,6 @@
|
||||
{{end}}
|
||||
</h4>
|
||||
<div class="diff-file-body ui attached unstackable table segment">
|
||||
{{if ne $file.Type 4}}
|
||||
<div class="file-body file-code has-context-menu code-diff {{if $.IsSplitStyle}}code-diff-split{{else}}code-diff-unified{{end}}">
|
||||
<table class="chroma">
|
||||
<tbody>
|
||||
@ -250,7 +247,6 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
Loading…
Reference in New Issue
Block a user