Skip to content
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

gix-clean fixes #1465

Merged
merged 5 commits into from
Jul 25, 2024
Merged

gix-clean fixes #1465

merged 5 commits into from
Jul 25, 2024

Conversation

Byron
Copy link
Member

@Byron Byron commented Jul 24, 2024

Fixes #1464

Tasks

  • handle ignored sub-repos correctly in deletion mode
  • add list of worktree-directories to prevent deleting them.
    • There probably is no need to specifically classify them, as users who want that can always perform their own match later.

That way it's possibel for them to be equivalent to submodules, which
would never be deleted by accident due to their 'tracked' status.

This works by passing repository-relative paths of worktree locations
that are within this repository.
This includes an improvement on how `gix` initiates a dirwalk with the purpose
of deletion so that worktrees are protected should the fall into the parent-repository
working directory.
@Byron Byron marked this pull request as ready for review July 25, 2024 15:12
@Jake-Shadle
Copy link
Contributor

I was able to workaround this by specifying --locked with cargo install since I noticed that the test failure in this PR and the one in cargo-deny's both come from cargo install rather than regular builds...but this doesn't actually make sense to me because AFAICT gix-path 0.10.9 and gix-credentials 0.24.3 will are used regardless of whether --locked is specified or not, so I'm a bit perplexed.

…impls (#1466)

As `bstr` adds a new implementation of `AsRef`, the `as_ref()` call becomes
ambiguous which will then break `gitoxide`.

Now `as_ref()` is avoided in favor of a method that can't fail.
@Byron
Copy link
Member Author

Byron commented Jul 25, 2024

@Jake-Shadle The relevant issue is #1466 with all the details. A fix is on the way, which is done in collaboration with bstr which kindly yanked the most recent version until gitoxide can respond.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gix clean with -r or -xd deletes the repo's own nested worktrees
2 participants