mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Properly handle and return empty string for dangling commits in GetBranchName (#11587)
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							723b199271
						
					
				
				
					commit
					31df012968
				
			@@ -27,7 +27,9 @@
 | 
			
		||||
			{{if IsMultilineCommitMessage .Commit.Message}}
 | 
			
		||||
				<pre class="commit-body">{{RenderCommitBody .Commit.Message $.RepoLink $.Repository.ComposeMetas}}</pre>
 | 
			
		||||
			{{end}}
 | 
			
		||||
			<span class="text grey">{{svg "octicon-git-branch" 16}}{{.BranchName}}</span>
 | 
			
		||||
			{{if .BranchName}}
 | 
			
		||||
				<span class="text grey">{{svg "octicon-git-branch" 16}}{{.BranchName}}</span>
 | 
			
		||||
			{{end}}
 | 
			
		||||
		</div>
 | 
			
		||||
		<div class="ui attached info segment {{$class}}">
 | 
			
		||||
			<div class="ui stackable grid">
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user