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
Change diff renamed files #1040
Change diff renamed files #1040
Conversation
03f935a
to
f71ad53
Compare
@Mifom Thanks for looking into this. I played a bit around with you branch. did not check the code yet but two observations jump out: a) we still do not detect renames against the workdir, this should be easy to add: b) and then there is an issue staging hunks in the renamed&changed file: b) current hunk staging code is a bit wonky, so don't worry If thats the reason, then this might be better done in a separate PR |
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.
lets add a dedicated unittest into asyncgit for the changed diff mechanic please
I'll mark it ready when I deal with hunks |
385cf2c
to
21e81ec
Compare
For now hunks mostly done. But there are
@extrawurst is this issue need to be fixed in this PR? Currently it's not supported by git2 and libgit2. |
i guess then not :) |
Then this is ready ? |
Yes |
If I understand correctly this is how it works now |
@Mifom so functionality wise this looks awesome to me. but I am not sure what I am missing, cause I cannot reproduce the single-hunk-issue: looks pretty good to me, with the only glitch that removing a hunk from the index removes the rename-part of the change aswell. but I guess thats a mini thing we can followup later with. especially cause its a philosophical decision of what should take precendence I guess :) what do you think? |
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.
just a few minor things left and a proper test for the rename case
7e45afd
to
ef9e167
Compare
@Mifom let me know when I should review it again |
@Mifom how can I help you get this over the finish line? |
@extrawurst I just need some time. I think I'll do it before the end of the week. |
741d7d2
to
79a41ca
Compare
@Mifom thanks for your continued effort, let me know when you think its ready |
@Mifom ping. feel free to join the discord if you need some feedback somewhere |
13482e1
to
74232f9
Compare
@extrawurst sorry for this long period without work on this PR. There are no good way for discarding hunks in renamed files at the moment, so this was disabled. About line staging: it works at least for the changes i made. Maybe there are cases where it will not work, so i'll check that. About renamed folder staging: at the moment when user mark folder as staged it passes to staging on the side of git2, so we haven't control this. That's should be reimplemented in gitui side to accurately remove them and not only add new files. |
@Mifom can you bring the branch up to date with master, so it could in theory be merged? |
Now it's up to date |
5182c47
to
a45351b
Compare
@extrawurst the branch is now up to date |
Thanks for sticking with this! 🥳 |
I think I have to revert this. after the merge no |
ok damn I don't get the changes made to |
This reverts commit 5f466ff.
@Mifom let me know if you need help figuring this out. |
This Pull Request closes #1038.
It changes the following:
I followed the checklist:
make check
without errors