mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Compare SSH_DOMAIN when parsing submodule URLs (#12753)
Right now we only compare the hostname from a submodule with the prefixURL it is viewed from to check if the submodule is hosted on the same Gitea instance. This adds an additional check to compare it against SSH_DOMAIN as well since the same Gitea instance might have a different hostname for SSH and if the submodule uses that hostname we should also detect that and link to the proper DOMAIN value. Fixes #12747, #9756
This commit is contained in:
		@@ -47,7 +47,7 @@
 | 
			
		||||
					<span class="truncate">
 | 
			
		||||
						{{if $entry.IsSubModule}}
 | 
			
		||||
							{{svg "octicon-file-submodule" 16}}
 | 
			
		||||
							{{$refURL := $commit.RefURL AppUrl $.Repository.FullName}}
 | 
			
		||||
							{{$refURL := $commit.RefURL AppUrl $.Repository.FullName $.SSHDomain}}
 | 
			
		||||
							{{if $refURL}}
 | 
			
		||||
								<a href="{{$refURL}}">{{$entry.Name}}</a><span class="at">@</span><a href="{{$refURL}}/commit/{{$commit.RefID}}">{{ShortSha $commit.RefID}}</a>
 | 
			
		||||
							{{else}}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user