mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Redirects for renamed repos (#807)
* Redirects for renamed repos * Remove unused phrase from locales
This commit is contained in:
		| @@ -408,6 +408,22 @@ func (err ErrRepoAlreadyExist) Error() string { | ||||
| 	return fmt.Sprintf("repository already exists [uname: %s, name: %s]", err.Uname, err.Name) | ||||
| } | ||||
|  | ||||
| // ErrRepoRedirectNotExist represents a "RepoRedirectNotExist" kind of error. | ||||
| type ErrRepoRedirectNotExist struct { | ||||
| 	OwnerID int64 | ||||
| 	RepoName string | ||||
| } | ||||
|  | ||||
| // IsErrRepoRedirectNotExist check if an error is an ErrRepoRedirectNotExist | ||||
| func IsErrRepoRedirectNotExist(err error) bool { | ||||
| 	_, ok := err.(ErrRepoRedirectNotExist) | ||||
| 	return ok | ||||
| } | ||||
|  | ||||
| func (err ErrRepoRedirectNotExist) Error() string { | ||||
| 	return fmt.Sprintf("repository redirect does not exist [uid: %d, name: %s]", err.OwnerID, err.RepoName) | ||||
| } | ||||
|  | ||||
| // ErrInvalidCloneAddr represents a "InvalidCloneAddr" kind of error. | ||||
| type ErrInvalidCloneAddr struct { | ||||
| 	IsURLError         bool | ||||
|   | ||||
		Reference in New Issue
	
	Block a user