-
Notifications
You must be signed in to change notification settings - Fork 349
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
creating new wc commit when @ becomes immutable #3600
Conversation
I currently have this implementation but it starts an infinite loop creating commits again and again on top of the @ immutable, cause when i call tx.finish() to end-up my new wc commit creation, the maybe_new_wc_commit still points to @ and not on my newly created commit (which should have become @ but doesn't) am i doing a huge blunder ? |
Is it any good ? I tried to avoid copy-pasting check_rewritable so i tried organizing stuff in a clear way. |
This is still marked as a draft. Did you just forget to mark it ready? |
Nope I didn't add any tests yet, but I wanted a feedback on my implementation to avoid writing any additional code that I should delete anyway Sry if I shouldn't ask review for that I don't really know how things works, I am new to contributing haha |
Ah, that makes sense. I think people typically mark it ready for review and leave a comment saying that they haven't added tests yet. I generally ignore PRs in draft state. I don't know if others do the same. |
Actually, the tests would be end-to-end tests of the CLI, I think, so they should not have to depend on how exactly it's implemented. https://github.com/martinvonz/jj/blob/main/cli/tests/test_immutable_commits.rs is probably a good place to add them. |
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.
Thanks for working on this! Sorry it took me a while to get to it.
No problem haha, thank you to take time to review my PR :) |
I added a test, and i am now checking all workspaces to update them. I also inlined what i could, but i didn't moved my check to Shall i add a test to check if it updates well every workspace ? |
I added more tests, i had two issues doing it:
|
Makes sense.
It's rare that multiple workspaces point to the same commit, so I don't think we need to worry about that. I.e., what you have right now is good enough IMO. |
In that case i think we have an usable version of the PR :) Is there anything more i can do about it ? |
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.
Looks good. Thanks!
Hi !
I am currently trying to write a fix for #3201
Checklist
If applicable:
CHANGELOG.md