mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	* Refactor repo.isBare to repo.isEmpty #5629 Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove Sync call
This commit is contained in:
		@@ -28,10 +28,10 @@ const (
 | 
			
		||||
	tplMigrate base.TplName = "repo/migrate"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// MustBeNotBare render when a repo is a bare git dir
 | 
			
		||||
func MustBeNotBare(ctx *context.Context) {
 | 
			
		||||
	if ctx.Repo.Repository.IsBare {
 | 
			
		||||
		ctx.NotFound("MustBeNotBare", nil)
 | 
			
		||||
// MustBeNotEmpty render when a repo is a empty git dir
 | 
			
		||||
func MustBeNotEmpty(ctx *context.Context) {
 | 
			
		||||
	if ctx.Repo.Repository.IsEmpty {
 | 
			
		||||
		ctx.NotFound("MustBeNotEmpty", nil)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user