mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Merge pull request #2757 from joshfng/fix-fork-relative-url
Use relative url when showing forked from
This commit is contained in:
		@@ -326,6 +326,11 @@ func (repo *Repository) RepoLink() string {
 | 
			
		||||
	return setting.AppSubUrl + "/" + repo.MustOwner().Name + "/" + repo.Name
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (repo *Repository) RepoRelLink() string {
 | 
			
		||||
	return "/" + repo.MustOwner().Name + "/" + repo.Name
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
func (repo *Repository) ComposeCompareURL(oldCommitID, newCommitID string) string {
 | 
			
		||||
	return fmt.Sprintf("%s/%s/compare/%s...%s", repo.MustOwner().Name, repo.Name, oldCommitID, newCommitID)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user