Skip to content

Commit

Permalink
Fix diff skipping lines
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
zeripath committed Oct 15, 2020
1 parent bfb3333 commit ab9e5aa
Showing 1 changed file with 325 additions and 183 deletions.
Loading

0 comments on commit ab9e5aa

Please sign in to comment.