mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Fix #1965 - the hyperlink and the display name of the branch
The hyperlink and the display name of the branch if the branch is in a folder or the branch name has '#'
This commit is contained in:
		@@ -35,6 +35,10 @@ func parsePrettyFormatLog(repo *Repository, logByts []byte) (*list.List, error)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RefEndName(refStr string) string {
 | 
			
		||||
	if strings.HasPrefix(refStr, "refs/heads/") {
 | 
			
		||||
		return strings.TrimPrefix(refStr, "refs/heads/")
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	index := strings.LastIndex(refStr, "/")
 | 
			
		||||
	if index != -1 {
 | 
			
		||||
		return refStr[index+1:]
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user