mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Add checkbox to search for all the branches by commit message (#813)
and updating the vendor directory
This commit is contained in:
		
							
								
								
									
										10
									
								
								vendor/code.gitea.io/git/repo_branch.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								vendor/code.gitea.io/git/repo_branch.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -102,6 +102,16 @@ func (repo *Repository) DeleteBranch(name string, opts DeleteBranchOptions) erro
 | 
			
		||||
	return err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// CreateBranch create a new branch
 | 
			
		||||
func (repo *Repository) CreateBranch(branch, newBranch string) error {
 | 
			
		||||
	cmd := NewCommand("branch")
 | 
			
		||||
	cmd.AddArguments(branch, newBranch)
 | 
			
		||||
 | 
			
		||||
	_, err := cmd.RunInDir(repo.Path)
 | 
			
		||||
 | 
			
		||||
	return err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// AddRemote adds a new remote to repository.
 | 
			
		||||
func (repo *Repository) AddRemote(name, url string, fetch bool) error {
 | 
			
		||||
	cmd := NewCommand("remote", "add")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user