File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -79,10 +79,10 @@ func (err *ErrInvalidCloneAddr) Unwrap() error {
7979 return util .ErrInvalidArgument
8080}
8181
82- // IsRemoteNotExistError returns the prefix of the error message when a remote does not exist.
83- // see: https://github.com/go-gitea/gitea/issues/32889#issuecomment-2571848216
84- // Should not add sapce in the end, sometimes git will add a `:`.
82+ // IsRemoteNotExistError checks the prefix of the error message to see whether a remote does not exist.
8583func IsRemoteNotExistError (err error ) bool {
84+ // see: https://github.com/go-gitea/gitea/issues/32889#issuecomment-2571848216
85+ // Should not add space in the end, sometimes git will add a `:`
8686 prefix1 := "exit status 128 - fatal: No such remote" // git < 2.30
8787 prefix2 := "exit status 2 - error: No such remote" // git >= 2.30
8888 return strings .HasPrefix (err .Error (), prefix1 ) || strings .HasPrefix (err .Error (), prefix2 )
You can’t perform that action at this time.
0 commit comments