Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add apply-patch, basic revert and cherry-pick functionality #17902

Merged
merged 56 commits into from
Feb 9, 2022

Commits on Dec 3, 2021

  1. Add apply-patch button

    This code adds a simple endpoint to apply patches to repositories and
    branches on gitea.
    
    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    13ba415 View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2021

  1. placate lint

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 4, 2021
    Configuration menu
    Copy the full SHA
    d477e5a View commit details
    Browse the repository at this point in the history

Commits on Dec 5, 2021

  1. update copyright years

    zeripath authored Dec 5, 2021
    Configuration menu
    Copy the full SHA
    c3326b2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f2c01fd View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2021

  1. Update templates/repo/editor/patch.tmpl

    Co-authored-by: silverwind <me@silverwind.io>
    zeripath and silverwind authored Dec 6, 2021
    Configuration menu
    Copy the full SHA
    d4a4f1f View commit details
    Browse the repository at this point in the history

Commits on Dec 9, 2021

  1. Configuration menu
    Copy the full SHA
    8d9a6df View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d0fc943 View commit details
    Browse the repository at this point in the history

Commits on Dec 10, 2021

  1. Configuration menu
    Copy the full SHA
    ea9f569 View commit details
    Browse the repository at this point in the history
  2. handle conflict

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 10, 2021
    Configuration menu
    Copy the full SHA
    c767f86 View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2021

  1. Add basic cherry-pick and revert functionality

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 12, 2021
    Configuration menu
    Copy the full SHA
    6ac0064 View commit details
    Browse the repository at this point in the history
  2. placate lint

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 12, 2021
    Configuration menu
    Copy the full SHA
    8b3cdba View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2021

  1. slight further improvement

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 15, 2021
    Configuration menu
    Copy the full SHA
    2527d2d View commit details
    Browse the repository at this point in the history
  2. placate lint

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 15, 2021
    Configuration menu
    Copy the full SHA
    427e99c View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2021

  1. Use git read-tree -m for better cherry-picking and reversion first

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 16, 2021
    Configuration menu
    Copy the full SHA
    20b6b1e View commit details
    Browse the repository at this point in the history
  2. Improve TestPatch to use git read-tree -m

    The current TestPatch conflict code uses a plain git apply which does not properly
    account for 3-way merging. However, we can improve things using `git read-tree -m` to
    do a three-way merge. We can also use `--patience` to generate a nicer diff for
    applying patches too.
    
    Fix go-gitea#13679
    
    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 16, 2021
    Configuration menu
    Copy the full SHA
    b23c35b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2f65bf9 View commit details
    Browse the repository at this point in the history

Commits on Dec 17, 2021

  1. Implement the git-merge-one-file algorithm

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    46bcf3e View commit details
    Browse the repository at this point in the history
  2. and handle empty patches too

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    cb4e9e1 View commit details
    Browse the repository at this point in the history
  3. placate lint

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    507ede4 View commit details
    Browse the repository at this point in the history
  4. use errConflict instead callback

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    7a523dd View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0a38bd1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8193743 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e02708e View commit details
    Browse the repository at this point in the history
  8. use the new updated merging from TestPatch

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    92de7bf View commit details
    Browse the repository at this point in the history
  9. move revert and cherry-pick to drop down for operations and add creat…

    …e tag/branch
    
    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    490ac9a View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2021

  1. Configuration menu
    Copy the full SHA
    561160f View commit details
    Browse the repository at this point in the history

Commits on Dec 20, 2021

  1. Configuration menu
    Copy the full SHA
    6a47494 View commit details
    Browse the repository at this point in the history

Commits on Dec 23, 2021

  1. Split off other actions button

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    20c6e69 View commit details
    Browse the repository at this point in the history
  2. remove browse-button css

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    d707b88 View commit details
    Browse the repository at this point in the history

Commits on Dec 24, 2021

  1. as per review

    remove margin from the bottom of the h3 and add it to the outer flex container, add
    ac class to center the flex box and remove the old message wrapper as it does not
    currently cause text-overflow ellipsis and its wrapping functionality is better served
    by the flex container. Also renames the Actions button Actions
    
    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    406f525 View commit details
    Browse the repository at this point in the history

Commits on Dec 25, 2021

  1. as per noerw

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 25, 2021
    Configuration menu
    Copy the full SHA
    1ac56a6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7244187 View commit details
    Browse the repository at this point in the history

Commits on Jan 1, 2022

  1. Configuration menu
    Copy the full SHA
    4a4caf2 View commit details
    Browse the repository at this point in the history
  2. Fix bug

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Jan 1, 2022
    Configuration menu
    Copy the full SHA
    5049cc9 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2022

  1. Configuration menu
    Copy the full SHA
    d3bbf2e View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2022

  1. Configuration menu
    Copy the full SHA
    b43ac20 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d371168 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7170909 View commit details
    Browse the repository at this point in the history
  4. fix linting and conflicts from previous prs

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Jan 20, 2022
    Configuration menu
    Copy the full SHA
    7cf8382 View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2022

  1. Configuration menu
    Copy the full SHA
    bed30e6 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2022

  1. Configuration menu
    Copy the full SHA
    6ec8527 View commit details
    Browse the repository at this point in the history
  2. use git.NewCommandContext

    6543 committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    046da34 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ac0be2d View commit details
    Browse the repository at this point in the history
  4. use RunWithContext

    6543 committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    2ca39bb View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2022

  1. Configuration menu
    Copy the full SHA
    6ca8f13 View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2022

  1. Configuration menu
    Copy the full SHA
    9557783 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    31fddcb View commit details
    Browse the repository at this point in the history
  3. adapt refactor

    6543 committed Feb 7, 2022
    Configuration menu
    Copy the full SHA
    095823d View commit details
    Browse the repository at this point in the history
  4. pass ctx down

    6543 committed Feb 7, 2022
    Configuration menu
    Copy the full SHA
    6494e11 View commit details
    Browse the repository at this point in the history
  5. cherrypick use normal ctx

    6543 committed Feb 7, 2022
    Configuration menu
    Copy the full SHA
    6fbc6e1 View commit details
    Browse the repository at this point in the history
  6. use attr

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Feb 7, 2022
    Configuration menu
    Copy the full SHA
    1f6e6e9 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2022

  1. Configuration menu
    Copy the full SHA
    683822b View commit details
    Browse the repository at this point in the history
  2. as per reviews

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Feb 8, 2022
    Configuration menu
    Copy the full SHA
    63c5656 View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2022

  1. Configuration menu
    Copy the full SHA
    f20e9d4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ff58993 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c7c3c63 View commit details
    Browse the repository at this point in the history