]> source.dussan.org Git - gitea.git/commit
Add a simple way to rename branch like gh (#15870)
authora1012112796 <1012112796@qq.com>
Fri, 8 Oct 2021 17:03:04 +0000 (01:03 +0800)
committerGitHub <noreply@github.com>
Fri, 8 Oct 2021 17:03:04 +0000 (19:03 +0200)
commitbb393596689ee7c33ecb041806ae2c9e8dc5dfab
treec6b71f73e53d5d5c1bb1da9e47e917f23538cd3f
parent56d79301b9f212e7801cbced1475238cc61c0748
Add a simple way to rename branch like gh (#15870)

- Update default branch if needed
- Update protected branch if needed
- Update all not merged pull request base branch name
- Rename git branch
- Record this rename work and auto redirect for old branch on ui

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: delvh <dev.lh@web.de>
14 files changed:
integrations/rename_branch_test.go [new file with mode: 0644]
models/branches.go
models/branches_test.go
models/fixtures/renamed_branch.yml [new file with mode: 0644]
models/migrations/migrations.go
models/migrations/v197.go [new file with mode: 0644]
modules/context/repo.go
modules/git/repo_branch.go
options/locale/locale_en-US.ini
routers/web/repo/setting_protected_branch.go
routers/web/web.go
services/forms/repo_branch_form.go
services/repository/branch.go
templates/repo/settings/branches.tmpl