1
1
mirror of https://github.com/go-gitea/gitea synced 2025-01-10 17:54:27 +00:00
James E. Blair a5604b1611 Fix renames over redirects (#6216)
In #6211, we started creating repo_redirects for ownership transfers,
however that opens an edge case where a user might perform the
following sequence:

rename org1/repo1 -> org1/repo2  (creates org1/repo1 redirect)
transfer org2/repo1 -> org1/repo1 (org1/repo1 redirect continues to exist)
rename org1/repo1 -> org1/repo3 (fails due to existing org1/repo1 redirect)

This change ensures that each time we rename or transfer a repo,
we delete any existing redirects at the target location.  This
already happens when a new repo is created.  By doing this we ensure
that we'll never have both a repo and a redirect at the same location.

Signed-off-by: James E. Blair <jeblair@redhat.com>
2019-03-02 15:07:19 +02:00
..
2018-03-06 09:22:16 +08:00
2019-02-02 21:56:15 +00:00
2017-05-26 09:38:18 +08:00
2017-05-04 13:54:56 +08:00
2018-10-27 22:45:24 +08:00
2019-02-19 09:39:39 -05:00
2018-05-09 19:29:04 +03:00
2014-04-13 03:14:43 -04:00
2018-10-25 18:55:16 +08:00
2019-01-13 14:06:22 -05:00
2019-02-07 12:00:52 +00:00
2019-03-02 15:07:19 +02:00
2018-10-26 12:37:57 +03:00
2018-05-19 17:12:37 +03:00
2018-05-19 17:12:37 +03:00
2018-10-20 18:19:21 -04:00