mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	fix variable assigned and not used.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
		@@ -2099,7 +2099,7 @@ func ForkRepository(u *User, oldRepo *Repository, name, desc string) (_ *Reposit
 | 
			
		||||
		repoPath, fmt.Sprintf("ForkRepository(git update-server-info): %s", repoPath),
 | 
			
		||||
		"git", "update-server-info")
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, fmt.Errorf("git update-server-info: %v", err)
 | 
			
		||||
		return nil, fmt.Errorf("git update-server-info: %v", stderr)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if err = createUpdateHook(repoPath); err != nil {
 | 
			
		||||
 
 | 
			
		||||
@@ -146,10 +146,6 @@ func RepoAssignment(args ...bool) macaron.Handler {
 | 
			
		||||
 | 
			
		||||
		userName := ctx.Params(":username")
 | 
			
		||||
		repoName := ctx.Params(":reponame")
 | 
			
		||||
		refName := ctx.Params(":branchname")
 | 
			
		||||
		if len(refName) == 0 {
 | 
			
		||||
			refName = ctx.Params(":path")
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// Check if the user is the same as the repository owner
 | 
			
		||||
		if ctx.IsSigned && ctx.User.LowerName == strings.ToLower(userName) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user