-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Finally fix diff names #13136
Finally fix diff names #13136
Conversation
go-gitea#12771 attempted to fix diff by avoiding the git diff line as it is possible to have an ambiguous line here. go-gitea#12254 attempted to fix diff by assuming that names would quoted if they needed to be and if one was quoted then both would be. Both of these were wrong. I have now discovered `--src-prefix` and `--dst-prefix` which means that we can set this in such a way to force the git diff to always be unambiguous. Therefore this PR rollsback most of the changes in go-gitea#12771 and uses these options to fix this. Signed-off-by: Andrew Thornton <[email protected]>
Signed-off-by: Andrew Thornton <[email protected]>
Why are rename from and rename to cases removed? |
Because they're no longer needed. That code was added when we couldn't get the names from the git diff line - so I've stopped back to the code that was there before. I can add them back in if preferred. Parsepatch needs rewriting in any case as can't parse anything with -- or ++ at the start of a line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've confirmed that this works on git 1.8
🚀 |
Codecov Report
@@ Coverage Diff @@
## master #13136 +/- ##
==========================================
- Coverage 42.36% 42.07% -0.29%
==========================================
Files 677 678 +1
Lines 74627 75029 +402
==========================================
- Hits 31616 31571 -45
- Misses 37865 38320 +455
+ Partials 5146 5138 -8
Continue to review full report at Codecov.
|
Please send backport |
Backport go-gitea#13136 it is possible to have an ambiguous line here. if they needed to be and if one was quoted then both would be. Both of these were wrong. I have now discovered `--src-prefix` and `--dst-prefix` which means that we can set this in such a way to force the git diff to always be unambiguous. Therefore this PR rollsback most of the changes in go-gitea#12771 and uses these options to fix this. Signed-off-by: Andrew Thornton <[email protected]>
Backport #13136 it is possible to have an ambiguous line here. if they needed to be and if one was quoted then both would be. Both of these were wrong. I have now discovered `--src-prefix` and `--dst-prefix` which means that we can set this in such a way to force the git diff to always be unambiguous. Therefore this PR rollsback most of the changes in #12771 and uses these options to fix this. Signed-off-by: Andrew Thornton <[email protected]>
#12771 attempted to fix diff by avoiding the git diff line as
it is possible to have an ambiguous line here.
#12254 attempted to fix diff by assuming that names would quoted
if they needed to be and if one was quoted then both would be.
Both of these were wrong.
I have now discovered
--src-prefix
and--dst-prefix
whichmeans that we can set this in such a way to force the git diff
to always be unambiguous.
Therefore this PR rollsback most of the changes in #12771 and
uses these options to fix this.
Fix #13060
Signed-off-by: Andrew Thornton [email protected]