-
Notifications
You must be signed in to change notification settings - Fork 299
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
Programming exercises
: Fix diff view for renamed files
#8634
Programming exercises
: Fix diff view for renamed files
#8634
Conversation
This reverts commit 726e031.
Programming exercises
: Improve diff view of renamed filesProgramming exercises
: Fix diff view of renamed files
WalkthroughThe recent update enhances the handling of file renaming in Git diffs within the Changes
Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (10)
Files not reviewed due to errors (1)
Files skipped from review due to trivial changes (3)
Additional Context UsedPath-based Instructions (7)
Additional comments not posted (6)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Followed the testing steps on ts1, worked as described - all commits and respective changes are displayed, the files are labeled properly
Second Test logs
florianglombik@MBP-von-Florian ge25bastestcoursevisbilitytest-ge25bas % git add .
florianglombik@MBP-von-Florian ge25bastestcoursevisbilitytest-ge25bas % git commit -m "step 3"
[main 09e74b5] step 3
1 file changed, 1 insertion(+), 1 deletion(-)
rename src/in/tum/test/{BubbleSort.java => BubbleSortChangeLineAndFileName.java} (83%)
florianglombik@MBP-von-Florian ge25bastestcoursevisbilitytest-ge25bas % git add .
florianglombik@MBP-von-Florian ge25bastestcoursevisbilitytest-ge25bas % git commit -m "step 5"
[main 9fe3542] step 5
1 file changed, 0 insertions(+), 0 deletions(-)
rename src/in/tum/test/{BubbleSortChangeLineAndFileName.java => BubbleSort1234.java} (100%)
florianglombik@MBP-von-Florian ge25bastestcoursevisbilitytest-ge25bas % git add .
florianglombik@MBP-von-Florian ge25bastestcoursevisbilitytest-ge25bas % git commit -m "step 8"
[main 492c396] step 8
3 files changed, 23 insertions(+), 1 deletion(-)
create mode 100644 src/in/tum/test/MergeSort1.java
create mode 100644 src/in/tum/test/NewMergeSort.java
florianglombik@MBP-von-Florian ge25bastestcoursevisbilitytest-ge25bas % git push
Enumerating objects: 28, done.
Counting objects: 100% (28/28), done.
Delta compression using up to 10 threads
Compressing objects: 100% (13/13), done.
Writing objects: 100% (22/22), 1.79 KiB | 1.79 MiB/s, done.
Total 22 (delta 5), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (5/5)
remote: Updating references: 100% (1/1)
I might have found another issue in my first testing attempt, it might not be directly related since I had some conflict with the code editor that I've noticed in the last testing step.
As I didn't review the code I do not know if it is related to the changed: MergeSort2
and MergeSort3
are created and not renamed (see logs below)
Steps to reproduce: #8634 (comment)
Screenshots and further information
Commit that is not displayed properly https://artemis-test1.artemis.cit.tum.de/courses/12/exercises/72/repository/199/commit-history/4f239016dc8e2d181c823787b1a5c1a024f6a164
Repository https://artemis-test1.artemis.cit.tum.de/courses/12/exercises/72/repository/199
First Test logs
florianglombik@MBP-von-Florian ge25bastestcoursecheckoutdirectoriesjava-ge25bas % git add .
florianglombik@MBP-von-Florian ge25bastestcoursecheckoutdirectoriesjava-ge25bas % git commit -m "renamed file"
[main d241c0e] renamed file
1 file changed, 2 insertions(+), 2 deletions(-)
rename src/packageName/{BubbleSort.java => AmazingBubbleSort.java} (81%)
florianglombik@MBP-von-Florian ge25bastestcoursecheckoutdirectoriesjava-ge25bas % git add .
florianglombik@MBP-von-Florian ge25bastestcoursecheckoutdirectoriesjava-ge25bas % git commit -m "rename the file a second time"
[main b9b8684] rename the file a second time
1 file changed, 0 insertions(+), 0 deletions(-)
rename src/packageName/{AmazingBubbleSort.java => AmazingButNotIncredibleBubbleSort.java} (100%)
florianglombik@MBP-von-Florian ge25bastestcoursecheckoutdirectoriesjava-ge25bas % git add .
florianglombik@MBP-von-Florian ge25bastestcoursecheckoutdirectoriesjava-ge25bas % git add .
florianglombik@MBP-von-Florian ge25bastestcoursecheckoutdirectoriesjava-ge25bas % git commit -m "adding, deleting and modifying files"
[main 4f23901] adding, deleting and modifying files
4 files changed, 40 insertions(+), 3 deletions(-)
rename src/packageName/{MergeSort.java => MergeSort1.java} (75%)
create mode 100644 src/packageName/MergeSort2.java
create mode 100644 src/packageName/MergeSort3.java
florianglombik@MBP-von-Florian ge25bastestcoursecheckoutdirectoriesjava-ge25bas % git push
Enumerating objects: 21, done.
Counting objects: 100% (21/21), done.
Delta compression using up to 10 threads
Compressing objects: 100% (14/14), done.
Writing objects: 100% (17/17), 1.54 KiB | 1.54 MiB/s, done.
Total 17 (delta 8), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (8/8)
remote: Updating references: 100% (1/1)
To https://artemis-test1.artemis.cit.tum.de/git/GE25BASTESTCOURSECHECKOUTDIRECTORIESJAVA/ge25bastestcoursecheckoutdirectoriesjava-ge25bas.git
fae4ba0..4f23901 main -> main
I investigated how to reproduce it:
|
@florian-glombik Good catch! Basically, the copy detection of Git is producing diff entries that the Client interprets as renaming. At the moment, we cannot distinguish between copying and moving. @krusche and I have discussed this and decided that we'll handle it in in a separate PR (we may be able to add some transient fields to the diff report or the diff enteries that carry this information) |
|
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.
Maintainer approved
Programming exercises
: Fix diff view of renamed filesProgramming exercises
: Fix diff view for renamed files
Checklist
General
Server
Client
Changes affecting Programming Exercises
Motivation and Context
During the review of #8540, I noticed that renaming files wasn't working as expected when viewing commit details. This had two causes:
Description
When processing the diff, we now keep track of entries like this:
Steps for Testing
Prerequisites:
rename src/de/tum/cit/ase/{WillRename.java => HaveRenamed.java} (82%)
when committing using the command line)Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Review Progress
Performance Review
Code Review
Manual Tests
Test Coverage
Client
Server
Screenshots