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
456d63b6cf
commit
16e34025b4
1 changed files with 15 additions and 19 deletions
|
@ -49,9 +49,7 @@
|
|||
{{svg "octicon-chevron-down" 18}}
|
||||
</a>
|
||||
<div class="bold ui left df ac">
|
||||
{{if not $file.IsRenamed}}
|
||||
{{template "repo/diff/stats" dict "file" . "root" $}}
|
||||
{{end}}
|
||||
</div>
|
||||
<span class="file mono">{{$file.Name}}</span>
|
||||
<div class="diff-file-header-actions df ac">
|
||||
|
@ -85,7 +83,7 @@
|
|||
<div class="bold df ac">
|
||||
{{if $file.IsBin}}
|
||||
{{$.i18n.Tr "repo.diff.bin"}}
|
||||
{{else if not $file.IsRenamed}}
|
||||
{{else}}
|
||||
{{template "repo/diff/stats" dict "file" . "root" $}}
|
||||
{{end}}
|
||||
</div>
|
||||
|
@ -105,7 +103,6 @@
|
|||
</div>
|
||||
</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{{if not $isImage}} code-diff{{end}}{{if $.IsSplitStyle}} code-diff-split{{else}} code-diff-unified{{end}}{{if $isImage}} py-4{{end}}">
|
||||
<table class="chroma{{if $isImage}} w-100{{end}}">
|
||||
<tbody>
|
||||
|
@ -121,7 +118,6 @@
|
|||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
|
Reference in a new issue