-
Notifications
You must be signed in to change notification settings - Fork 1
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
convert
errors if tempdir is on different filesystem
#96
Comments
The error happens because |
Huh, that's frustrating. I'm a little surprised that didn't get caught in the tests -- I guess none of the test environments run with the tempdir on a different filesystem, or maybe the whole test suite runs in the tempdir... I think that we can create a tempdir in the parent of the outer-most worktree and use that to fix this. |
`git prole convert` now creates a tempdir in the parent of the determined destination of the converted repo. This prevents some errors when the /tmp directory is on a different filesystem, such as a tmpfs. The tempdir will be deleted if and only if it is empty after conversion. This should always be the case and is to prevent any data loss. Fixes issue 9999years#96
Fixes issue #96 I tested the change on some repos (no longer gives the error) and ran the tests with `nix flake check`. Please do review this carefully since I'm still pretty new to Rust. ^^ ### Change summary `git prole convert` now creates a tempdir in the parent of the determined destination of the converted repo. This prevents some errors when the /tmp directory is on a different filesystem, such as a tmpfs. The tempdir will be deleted if and only if it is empty after conversion. This should always be the case and is to prevent any data loss. --------- Co-authored-by: Rebecca Turner <[email protected]>
Your project looks really exciting!
I was just trying it out, but there are some issues on my system. Here's one, which I may be able to send a PR for, but I want to report it first to get feedback on how you want to solve it.
My environment
I have my
/tmp
on a tmpfs and I use impermanence with btrfs to mount persistent directories (like git repos).What happened
When I tried to run
git prole convert
(after #95), it failed with the following error:How to solve it
I haven't looked into the codebase enough, but I think that git-prole is trying to move the
.git
to a tempdir before it rearranges the current directory.The text was updated successfully, but these errors were encountered: