mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Redirects for renamed repos (#807)
* Redirects for renamed repos * Remove unused phrase from locales
This commit is contained in:
@@ -68,6 +68,11 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
|
||||
return
|
||||
}
|
||||
|
||||
err := models.NewRepoRedirect(ctx.Repo.Owner.ID, repo.ID, repo.Name, newRepoName)
|
||||
if err != nil {
|
||||
ctx.Handle(500, "NewRepoRedirect", err)
|
||||
}
|
||||
|
||||
log.Trace("Repository name changed: %s/%s -> %s", ctx.Repo.Owner.Name, repo.Name, newRepoName)
|
||||
}
|
||||
// In case it's just a case change.
|
||||
|
Reference in New Issue
Block a user