summaryrefslogtreecommitdiffstats
path: root/templates/repo/issue
diff options
context:
space:
mode:
authorsinguliere <35190819+singuliere@users.noreply.github.com>2022-02-06 10:05:29 +0100
committerGitHub <noreply@github.com>2022-02-06 17:05:29 +0800
commit8bd89ca2941bdb4f41be82d0ae66fdf5ceca0fe5 (patch)
tree461a43fabe026918f33ca12411c23ea65e54cbd3 /templates/repo/issue
parent9419dd2b62ab4399e4e7711a3ec4b81858883923 (diff)
downloadgitea-8bd89ca2941bdb4f41be82d0ae66fdf5ceca0fe5.tar.gz
gitea-8bd89ca2941bdb4f41be82d0ae66fdf5ceca0fe5.zip
preserve users if restoring a repository on the same Gitea instance (#18604)
When calling DumpRepository and RestoreRepository on the same Gitea instance, the users are preserved: all labels, issues etc. belong to the external user who is, in this particular case, the local user. Dead code verifying g.gitServiceType.Name() == "" (i.e. plain git) is removed. The function is never called because the plain git downloader does not migrate anything that is associated to a user, by definition. Errors returned by GetUserIDByExternalUserID are no longer ignored. The userMap is used when the external user is not kown, which is the most common case. It was only used when the external user exists which happens less often and, as a result, every occurence of an unknown external user required a SQL query. Signed-off-by: Loïc Dachary <loic@dachary.org> Co-authored-by: Loïc Dachary <loic@dachary.org> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'templates/repo/issue')
0 files changed, 0 insertions, 0 deletions