-
-
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
Revisions (second try) #13313
Revisions (second try) #13313
Conversation
0878ec7
to
db73765
Compare
Somebody could please add |
…evs. When using the base...head pattern git diff works out the common merge base and then compare the mergebase to the head revision. This results in incorrect stats if the you are comparing a y shaped branches e.g.: sets of revisions. For example on the pull requests view changes tab when you select since revision, when the last revision just changed the commit msg the returned content is correctly empty (because there is no file content change) but the stat is not because the comparasion is not made between the actual revision heads but their merge head. Regural /compare/base...head comparisions which also use this function are not affected by this change because they *themselves* work out the common merge base and they use *that* to call this function. So they were doing this anyway instead of relying on this function to compute the common merge base. I checked all paths (I think...) that leads to this function and all calls to this seem to be correct after this change.
…ng using symbols. Fix section description being printed incorrectly. '@ -1,4...' instead of '@@ -1,4...'. Added a test for this.
…o-gitea#12800 Also add warnings if a '/compare/base...head' is y shaped and offer to show the raw difference (where the inverse of new commits on base are included in the diff) and also offer to compare the y shaped junction with range-diff. The rangediff page uses the interdiff tool to work out the changes between corresponding commits.
Can something like be reused/extended https://github.com/kordianbruck/interdiff to not introduce dependency on something that everybody would need to install as it does not come by default on most OS |
@lafriks Maybe. I tried it with this:
Interdiff says:
Which is not bad. That function says:
|
@lafriks I was playing with these go |
Hm. The version here, works somewhat good: https://github.com/google/go-patchutils. But it still doesn't deal with extra lines created by git and the a/filename b/filename thing correctly. The repo requires the google contributor whatever to be signed to contribute so... not ideal. |
As it is only single file we could move it into Gitea modules and change it to work as we need |
@lafriks Yes. I am doing it. I am changing it to track the I have done some part of it but it is not yet ready. |
Closed as the author disappeared. |
Second try of: #12665
Fixes #12604
Fixes #5254
Fixes #12800
For the range-diff page to work the interdiff (part of the patchtools package) is required on the server.