Fix git error handling (#32401)

This commit is contained in:
wxiaoguang authored and GitHub committed 2024-11-02 11:20:22 +00:00
1 parent 13a203828c
commit e524f63d58
10 files changed
+35 -89

No files matched your search

+1 -3
View File
@@ -183,9 +183,7 @@ func pushUpdates(optsList []*repo_module.PushUpdateOptions) error {
repo.IsEmpty = false
if repo.DefaultBranch != setting.Repository.DefaultBranch {
if err := gitrepo.SetDefaultBranch(ctx, repo, repo.DefaultBranch); err != nil {
if !git.IsErrUnsupportedVersion(err) {
return err
}
return err
}
}
// Update the is empty and default_branch columns