mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 00:13:39 +00:00 
			
		
		
		
	DefaultBranch needs to be prefixed by BranchPrefix (#9356)
This commit is contained in:
		@@ -158,7 +158,7 @@ type fileUpdate struct {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func getDefaultBranchSha(repo *models.Repository) (string, error) {
 | 
					func getDefaultBranchSha(repo *models.Repository) (string, error) {
 | 
				
			||||||
	stdout, err := git.NewCommand("show-ref", "-s", repo.DefaultBranch).RunInDir(repo.RepoPath())
 | 
						stdout, err := git.NewCommand("show-ref", "-s", git.BranchPrefix+repo.DefaultBranch).RunInDir(repo.RepoPath())
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return "", err
 | 
							return "", err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user