We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 624c0ba commit caef9f9Copy full SHA for caef9f9
modules/git/repo.go
@@ -86,7 +86,8 @@ func (repo *Repository) IsEmpty() (bool, error) {
86
Stdout: &output,
87
Stderr: &errbuf,
88
}); err != nil {
89
- if err.Error() == "exit status 1" && errbuf.String() == "" {
+ if (err.Error() == "exit status 1" || err.Error() == "exit status 129") && strings.TrimSpace(errbuf.String()) == "" {
90
+ // git 2.11 exits with 129 if the repo is empty
91
return true, nil
92
}
93
return true, fmt.Errorf("check empty: %w - %s", err, errbuf.String())
0 commit comments