Description
I was wanting to call the equivalent of os.RemoveAll(...)
on a worktree's filesystem and ended up implementing support for it here and in go-git
(the latter was a trivial change only in RepositoryFilesystem
; would this change be welcomed here?
I suspect ideally this would be implemented as an optional additional interface to not break backwards compatibility (existing user would have to implement the interface on upgrade), but maybe it would be best for a v6 to simplify the interface? Thoughts?
I also ended up implementing a non-chroot'd version (similar to osfs/os_bound.go
, but taking into account an arbitrary $PWD
different from the actual $PWD
at the time of execution), but I'm not sure that changeset has relevance outside of my use case. :-) Let me know if it is also of interest though!