-
Notifications
You must be signed in to change notification settings - Fork 319
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
Crash if a dir jj
doesn't track is a file in another commit. Also happens if untracked file conflicts with a tracked file.
#976
Comments
This error probably occurred at: Lines 715 to 722 in af55d17
There is also a very similar line in the Line 784 in af55d17
|
One solution would be to check if anything happens to be in the way around Lines 896 to 900 in af55d17
We could then remove it. I'm unsure if that's safe In other news, when I reproduced this bug in my own repo, I got a bit stuck until I removed the offending directory:
|
I suppose we could just delete the directory if it's empty in this scenario, but it can be more complicated if the directory was instead ignored. I think we should return a list of paths and errors we encountered, so we can tell the user that we failed to update some paths. Maybe we can just leave those paths as they are in the working copy. That would mean that they would instead appear modified in the working copy. I'm not sure if there's a better option. The "Working copy lock was dropped without being closed." can probably be ignored. I think that just happened because of the other bug, and it only happens in debug builds. |
jj
doesn't track is a file in another commitjj
doesn't track is a file in another commit. Also happens if untracked file conflicts with a tracked file.
Before this patch, when updating to a commit that has a file that's currently an ignored file on disk, jj would crash. After this patch, we instead leave the conflicting files or directories on disk. We print a helpful message about how to inspect the differences between the intended working copy and the actual working copy, and how to discard the unintended changes. Closes #976.
Here is a part of a test that crashes (add it to
test_resolve_command.rs
):The point is that
file
is a directory thatjj
doesn't track since it's empty. In another commit, it is a file. Updating to the second commit confusesjj
.The error is:
The text was updated successfully, but these errors were encountered: