]> source.dussan.org Git - gitea.git/commit
Add apply-patch, basic revert and cherry-pick functionality (#17902)
authorzeripath <art27@cantab.net>
Wed, 9 Feb 2022 20:28:55 +0000 (20:28 +0000)
committerGitHub <noreply@github.com>
Wed, 9 Feb 2022 20:28:55 +0000 (20:28 +0000)
commiteb748f5f3c93e8e347309fc75ea8273c06a5489b
treefceec474a21fa35437bcf3e90bd549c11976b72e
parent439ad34c71b8777a9dac369c643560b18bc41bab
Add apply-patch, basic revert and cherry-pick functionality (#17902)

This code adds a simple endpoint to apply patches to repositories and
branches on gitea. This is then used along with the conflicting checking
code in #18004 to provide a basic implementation of cherry-pick revert.

Now because the buttons necessary for cherry-pick and revert have
required us to create a dropdown next to the Browse Source button
I've also implemented Create Branch and Create Tag operations.

Fix #3880
Fix #17986

Signed-off-by: Andrew Thornton <art27@cantab.net>
23 files changed:
modules/git/diff.go
modules/structs/repo_file.go
options/locale/locale_en-US.ini
routers/api/v1/api.go
routers/api/v1/repo/patch.go [new file with mode: 0644]
routers/web/repo/cherry_pick.go [new file with mode: 0644]
routers/web/repo/patch.go [new file with mode: 0644]
routers/web/web.go
services/forms/repo_form.go
services/pull/patch.go
services/repository/files/cherry_pick.go [new file with mode: 0644]
services/repository/files/patch.go [new file with mode: 0644]
templates/repo/branch_dropdown.tmpl
templates/repo/commit_page.tmpl
templates/repo/editor/cherry_pick.tmpl [new file with mode: 0644]
templates/repo/editor/patch.tmpl [new file with mode: 0644]
templates/repo/home.tmpl
templates/swagger/v1_json.tmpl
web_src/js/components/RepoBranchTagDropdown.js
web_src/js/features/common-global.js
web_src/js/features/repo-branch.js
web_src/js/features/repo-legacy.js
web_src/less/_repository.less