mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 13:28:25 +00:00 
			
		
		
		
	Allow push to init a wiki repo (#1279)
* allow push to init a wiki repo * compact error check
This commit is contained in:
		@@ -296,6 +296,12 @@ func runServ(c *cli.Context) error {
 | 
				
			|||||||
		gitcmd = exec.Command(verb, repoPath)
 | 
							gitcmd = exec.Command(verb, repoPath)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if isWiki {
 | 
				
			||||||
 | 
							if err = repo.InitWiki(); err != nil {
 | 
				
			||||||
 | 
								fail("Internal error", "Failed to init wiki repo: %v", err)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	os.Setenv(models.ProtectedBranchRepoID, fmt.Sprintf("%d", repo.ID))
 | 
						os.Setenv(models.ProtectedBranchRepoID, fmt.Sprintf("%d", repo.ID))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	gitcmd.Dir = setting.RepoRootPath
 | 
						gitcmd.Dir = setting.RepoRootPath
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user