File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -472,12 +472,7 @@ func AllowLFSFiltersArgs() TrustedCmdArgs {
472472// see: https://github.com/go-gitea/gitea/issues/32889#issuecomment-2571848216
473473// Should not add sapce in the end, sometimes git will add a `:`.
474474func IsRemoteNotExistError (err error ) bool {
475- // for git < 2.30
476- prefix := "exit status 128 - fatal: No such remote"
477-
478- // for git >= 2.30
479- if DefaultFeatures ().CheckVersionAtLeast ("2.30" ) {
480- prefix = "exit status 2 - error: No such remote"
481- }
482- return strings .HasPrefix (err .Error (), prefix )
475+ prefix1 := "exit status 128 - fatal: No such remote" // git < 2.30
476+ prefix2 := "exit status 2 - error: No such remote" // git >= 2.30
477+ return strings .HasPrefix (err .Error (), prefix1 ) || strings .HasPrefix (err .Error (), prefix2 )
483478}
You can’t perform that action at this time.
0 commit comments