Explorar el Código

mod: bump github.com/gogs/git-module from 1.4.0 to 1.5.0 (#6877)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joe Chen <[email protected]>
dependabot[bot] hace 2 años
padre
commit
70c6f0a490
Se han modificado 4 ficheros con 5 adiciones y 5 borrados
  1. 1 1
      go.mod
  2. 2 2
      go.sum
  3. 1 1
      templates/repo/diff/box.tmpl
  4. 1 1
      templates/repo/diff/section_unified.tmpl

+ 1 - 1
go.mod

@@ -18,7 +18,7 @@ require (
 	github.com/go-macaron/toolbox v0.0.0-20190813233741-94defb8383c6
 	github.com/gogs/chardet v0.0.0-20150115103509-2404f7772561
 	github.com/gogs/cron v0.0.0-20171120032916-9f6c956d3e14
-	github.com/gogs/git-module v1.4.0
+	github.com/gogs/git-module v1.5.0
 	github.com/gogs/go-gogs-client v0.0.0-20200128182646-c69cb7680fd4
 	github.com/gogs/go-libravatar v0.0.0-20191106065024-33a75213d0a0
 	github.com/gogs/minwinsvc v0.0.0-20170301035411-95be6356811a

+ 2 - 2
go.sum

@@ -149,8 +149,8 @@ github.com/gogs/chardet v0.0.0-20150115103509-2404f7772561 h1:aBzukfDxQlCTVS0NBU
 github.com/gogs/chardet v0.0.0-20150115103509-2404f7772561/go.mod h1:Pcatq5tYkCW2Q6yrR2VRHlbHpZ/R4/7qyL1TCF7vl14=
 github.com/gogs/cron v0.0.0-20171120032916-9f6c956d3e14 h1:yXtpJr/LV6PFu4nTLgfjQdcMdzjbqqXMEnHfq0Or6p8=
 github.com/gogs/cron v0.0.0-20171120032916-9f6c956d3e14/go.mod h1:jPoNZLWDAqA5N3G5amEoiNbhVrmM+ZQEcnQvNQ2KaZk=
-github.com/gogs/git-module v1.4.0 h1:+0zcvzp3wxEMXVar2KnKmhI6JKlcAwjNUc6b5aTxs5M=
-github.com/gogs/git-module v1.4.0/go.mod h1:oN37FFStFjdnTJXsSbhIHKJXh2YeDsEcXPATVz/oeuQ=
+github.com/gogs/git-module v1.5.0 h1:2aAO79c36R3L6TdKutbVJwr0YwSWfRbPNP456yxDXtk=
+github.com/gogs/git-module v1.5.0/go.mod h1:oN37FFStFjdnTJXsSbhIHKJXh2YeDsEcXPATVz/oeuQ=
 github.com/gogs/go-gogs-client v0.0.0-20200128182646-c69cb7680fd4 h1:C7NryI/RQhsIWwC2bHN601P1wJKeuQ6U/UCOYTn3Cic=
 github.com/gogs/go-gogs-client v0.0.0-20200128182646-c69cb7680fd4/go.mod h1:fR6z1Ie6rtF7kl/vBYMfgD5/G5B1blui7z426/sj2DU=
 github.com/gogs/go-libravatar v0.0.0-20191106065024-33a75213d0a0 h1:K02vod+sn3M1OOkdqi2tPxN2+xESK4qyITVQ3JkGEv4=

+ 1 - 1
templates/repo/diff/box.tmpl

@@ -78,7 +78,7 @@
 				<div class="ui unstackable attached table segment">
 					{{$isImage := false}}
 					{{if $file.IsDeleted}}
-						{{$isImage = (call $.IsImageFileByIndex $file.Index)}}
+						{{$isImage = (call $.IsImageFileByIndex $file.OldIndex)}}
 					{{else}}
 						{{$isImage = (call $.IsImageFile $file.Name)}}
 					{{end}}

+ 1 - 1
templates/repo/diff/section_unified.tmpl

@@ -8,7 +8,7 @@
 					{{/* {{if gt $j 0}}<span class="fold octicon octicon-fold"></span>{{end}} */}}
 				</td>
 			{{else}}
-				<td class="lines-num lines-num-old" {{if $line.LeftLine}} id="diff-{{$file.Index}}L{{$line.LeftLine}}" data-line-number="{{$line.LeftLine}}"{{end}}></td>
+				<td class="lines-num lines-num-old" {{if $line.LeftLine}} id="diff-{{$file.OldIndex}}L{{$line.LeftLine}}" data-line-number="{{$line.LeftLine}}"{{end}}></td>
 				<td class="lines-num lines-num-new" {{if $line.RightLine}} id="diff-{{$file.Index}}R{{$line.RightLine}}" data-line-number="{{$line.RightLine}}"{{end}}></td>
 			{{end}}
 			<td class="lines-code">