fix: classify git failures on stderr, restrict migration failure detail (#39010)

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
silverwindandwxiaoguang authored and GitHub committed 2026-09-15 10:59:34 +02:00
1 parent 7b036e96c2
commit 812191c0f9
30 files changed
+136 -137

No files matched your search

+3 -3
View File
@@ -47,11 +47,11 @@ func ManagedRemoteRemove(ctx context.Context, repo RepositoryFacade, remoteName
func ParseRemoteAddressURL(ctx context.Context, repo RepositoryFacade, remoteName string) (*giturl.GitURL, error) {
addr, err := GetRemoteAddress(ctx, repo, remoteName)
if (addr == "" && err == nil) || IsRemoteNotExistError(err) {
return nil, util.NewNotExistErrorf("remote '%s' does not exist", remoteName)
}
if err != nil {
return nil, err
}
if addr == "" {
return nil, util.NewNotExistErrorf("remote '%s' does not exist", remoteName)
}
return giturl.ParseGitURL(addr)
}