mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-29 18:38:28 +00:00 
			
		
		
		
	Properly handle and return empty string for dangling commits in GetBranchName (#11587)
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							723b199271
						
					
				
				
					commit
					31df012968
				
			| @@ -1129,7 +1129,7 @@ func getCommitIDsFromRepo(repo *Repository, oldCommitID, newCommitID, baseBranch | ||||
| 		return nil, false, err | ||||
| 	} | ||||
|  | ||||
| 	if oldCommitBranch == "undefined" { | ||||
| 	if oldCommitBranch == "" { | ||||
| 		commitIDs = make([]string, 2) | ||||
| 		commitIDs[0] = oldCommitID | ||||
| 		commitIDs[1] = newCommitID | ||||
|   | ||||
		Reference in New Issue
	
	Block a user