You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Normally, when no is specified, git clean will not recurse into untracked directories to avoid removing too much. Specify -d to have it recurse into such directories as well.
This means when Dir is false, Worktree.Clean won't recurse into any subdirs, not just the "untracked" ones. I suspect this is because go-git appears to lack a notion of "untracked directory" as Status operates solely on files.
This is a pretty major disconnect in the semantics between git and go-git and I think should be considered an implementation bug.
The text was updated successfully, but these errors were encountered:
Per the docs:
But from the current implementation:
This means when
Dir
is false,Worktree.Clean
won't recurse into any subdirs, not just the "untracked" ones. I suspect this is because go-git appears to lack a notion of "untracked directory" asStatus
operates solely on files.This is a pretty major disconnect in the semantics between git and go-git and I think should be considered an implementation bug.
The text was updated successfully, but these errors were encountered: