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

Fix diff skipping lines #13157

Merged
merged 5 commits into from
Oct 16, 2020

Commits on Oct 15, 2020

  1. Fix diff skipping lines

    Backport go-gitea#13154
    
    ParsePatch previously just skipped all lines that start with "+++ " or "--- "
    and makes no attempt to see these lines in context.
    
    This PR rewrites ParsePatch to pay attention to context and position
    within a patch, ensuring that --- and +++ are only skipped if
    appropriate.
    
    This PR also fixes several issues with incomplete files.
    
    Fix https://codeberg.org/Codeberg/Community/issues/308
    Fix go-gitea#13153
    
    Signed-off-by: Andrew Thornton <[email protected]>
    zeripath committed Oct 15, 2020
    Configuration menu
    Copy the full SHA
    dd506c8 View commit details
    Browse the repository at this point in the history
  2. Add testcase

    Signed-off-by: Andrew Thornton <[email protected]>
    zeripath committed Oct 15, 2020
    Configuration menu
    Copy the full SHA
    d86c854 View commit details
    Browse the repository at this point in the history
  3. fix comment

    zeripath committed Oct 15, 2020
    Configuration menu
    Copy the full SHA
    1290c39 View commit details
    Browse the repository at this point in the history
  4. simplify error handling

    Signed-off-by: Andrew Thornton <[email protected]>
    zeripath committed Oct 15, 2020
    Configuration menu
    Copy the full SHA
    d517bbb View commit details
    Browse the repository at this point in the history
  5. never return io.EOF

    Signed-off-by: Andrew Thornton <[email protected]>
    zeripath committed Oct 15, 2020
    Configuration menu
    Copy the full SHA
    3fac477 View commit details
    Browse the repository at this point in the history