Skip to content

gix-clean fixes#1465

Merged
Sebastian Thiel (Byron) merged 5 commits into
mainfrom
fix-clean
Jul 25, 2024
Merged

gix-clean fixes#1465
Sebastian Thiel (Byron) merged 5 commits into
mainfrom
fix-clean

Conversation

@Byron

@Byron Sebastian Thiel (Byron) commented Jul 24, 2024

Copy link
Copy Markdown
Member

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
Sebastian Thiel (Byron) marked this pull request as ready for review July 25, 2024 15:12
@Jake-Shadle

Copy link
Copy Markdown
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
Copy Markdown
Member Author

Jake Shadle (@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