Skip to content

Commit

Permalink
fix: Adjust gix clean warning and help for worktree fix
Browse files Browse the repository at this point in the history
Since #1470 (for #1469), the repository's own nested worktrees are
no longer removed when using `gix clean`, even if they are nested
arbitarily under ignored directories. So no new mention of
worktrees (separate from "repositories") in the help and warning
message is accurate or required.

This removes that, which means really we are keeping the warning
message the same as it had been earlier, while still otherwise
bringing in new explanatory text in the `gix clean` options help.
  • Loading branch information
EliahKagan committed Jul 26, 2024
1 parent a32dcc2 commit fcebc44
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gitoxide-core/src/repository/clean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ pub(crate) mod function {
wrote_nl = true;
writeln!(
err,
"WARNING: would remove repositories and worktrees hidden inside ignored directories - use --skip-hidden-repositories to skip{}",
"WARNING: would remove repositories hidden inside ignored directories - use --skip-hidden-repositories to skip{}",
wrap_in_parens(msg.take().unwrap_or_default())
)?;
}
Expand Down
6 changes: 3 additions & 3 deletions src/plumbing/options/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -592,10 +592,10 @@ pub mod clean {
/// in reasonable, but often unexpected ways.
#[arg(long, short = 'm')]
pub pathspec_matches_result: bool,
/// Enter ignored directories to skip repositories (and worktrees) contained within.
/// Enter ignored directories to skip repositories contained within.
///
/// This identifies and avoids deleting any unrelated repositories, or alternate worktrees
/// of this repository, that are nested inside ignored directories eligible for removal.
/// This identifies and avoids deleting separate repositories that are nested inside
/// ignored directories eligible for removal.
#[arg(long)]
pub skip_hidden_repositories: Option<FindRepository>,
/// What kind of repositories to find inside of untracked directories.
Expand Down

0 comments on commit fcebc44

Please sign in to comment.