1
1
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:
Ethan Koenig
2017-02-05 09:35:03 -05:00
committed by Lunny Xiao
parent e86d935175
commit 027591a3a5
29 changed files with 127 additions and 27 deletions

View File

@@ -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.