-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Diff skips lines starting with '++ ' or '-- ' #13153
Comments
zeripath
added a commit
to zeripath/gitea
that referenced
this issue
Oct 15, 2020
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
added a commit
to zeripath/gitea
that referenced
this issue
Oct 15, 2020
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
added a commit
to zeripath/gitea
that referenced
this issue
Oct 15, 2020
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]>
techknowlogick
pushed a commit
that referenced
this issue
Oct 16, 2020
* Fix diff skipping lines 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 #13153 Signed-off-by: Andrew Thornton <[email protected]> * Add testcase Signed-off-by: Andrew Thornton <[email protected]> * fix comment * simplify error handling Signed-off-by: Andrew Thornton <[email protected]> * never return io.EOF Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: Lauris BH <[email protected]>
techknowlogick
pushed a commit
that referenced
this issue
Oct 16, 2020
* Fix diff skipping lines Backport #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 #13153 Signed-off-by: Andrew Thornton <[email protected]> * Add testcase Signed-off-by: Andrew Thornton <[email protected]> * fix comment * simplify error handling Signed-off-by: Andrew Thornton <[email protected]> * never return io.EOF Signed-off-by: Andrew Thornton <[email protected]>
techknowlogick
added a commit
that referenced
this issue
Oct 17, 2020
* Fix diff skipping lines Backport #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 #13153 Signed-off-by: Andrew Thornton <[email protected]> * Add testcase Signed-off-by: Andrew Thornton <[email protected]> * fix comment * simplify error handling Signed-off-by: Andrew Thornton <[email protected]> * never return io.EOF Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: techknowlogick <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
https://try.gitea.io/arandomer/pathological/commit/88612bf69b8b2035bf41ae4fdbab0ae399238d60.diff
Description
First noted in https://codeberg.org/Codeberg/Community/issues/308
Gitea's ParsePatch code in services/gitdiff/gitdiff.go will skip any diff lines that start with
"+++ "
or"--- "
.The text was updated successfully, but these errors were encountered: