mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	| @@ -86,7 +86,8 @@ func (repo *Repository) IsEmpty() (bool, error) { | ||||
| 			Stdout: &output, | ||||
| 			Stderr: &errbuf, | ||||
| 		}); err != nil { | ||||
| 		if err.Error() == "exit status 1" && errbuf.String() == "" { | ||||
| 		if (err.Error() == "exit status 1" || err.Error() == "exit status 129") && strings.TrimSpace(errbuf.String()) == "" { | ||||
| 			// git 2.11 exits with 129 if the repo is empty | ||||
| 			return true, nil | ||||
| 		} | ||||
| 		return true, fmt.Errorf("check empty: %w - %s", err, errbuf.String()) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user