Skip to content

Commit 9cb9aca

Browse files
committed
fix comment typo
1 parent 47390b5 commit 9cb9aca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/git/remote.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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.
8583
func 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)

0 commit comments

Comments
 (0)