-
-
Notifications
You must be signed in to change notification settings - Fork 320
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
fix: ignore .gitignore
files that are directories
#1386
Conversation
This happens in real-life, and Git itself doesn't budge.
@@ -59,7 +59,7 @@ pub fn create(original: &Path, link: &Path) -> io::Result<()> { | |||
pub fn is_collision_error(err: &std::io::Error) -> bool { | |||
// TODO: use ::IsDirectory as well when stabilized instead of raw_os_error(), and ::FileSystemLoop respectively | |||
err.kind() == AlreadyExists | |||
|| err.raw_os_error() == Some(21) | |||
|| err.raw_os_error() == Some(if cfg!(windows) { 5 } else { 21 }) |
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.
This function here appears to be under #[cfg(not(windows))]
making cfg!(windows)
always false.
The #[cfg(windows)]
below should probably be changed instead.
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.
That's a great catch, thank you!
I pushed the fix into this standing PR.
Should something be done so that new binary installations of When installed from source using
But when installing with
In both cases, this is with It may be that nothing should be done. If the main affected subcommand is |
Thanks for making me aware of this. I think the only way to assure such updates become available in For this one, I think it's OK to leave it as is and do nothing. |
I could delete the cargo-quickinstall release for gitoxide, that should trigger a rebuild later. |
If you would like to practice this workflow on that occasion, I'd take you upon that offer. Maybe one day that will come in handy for emergency fixes of sorts. |
Removed gitoxide from cargo-quickinstall, waiting for it to rebuild. |
While |
This happens in real-life, and Git itself doesn't budge.
Related to gitbutlerapp/gitbutler#3876