clone: more forcefully clean clones of untracked files and empty dirs

This commit is contained in:
Lily Foster 2023-08-29 19:22:05 -04:00 committed by Cole Helbling
parent cda5aa2ac7
commit 653829c95e

View file

@ -137,6 +137,16 @@ pub trait GitClonable {
.stdout(Stdio::null())
.status()?;
debug!("git clean -x -d --force");
Command::new("git")
.arg("clean")
.arg("-x")
.arg("-d")
.arg("--force")
.current_dir(self.clone_to())
.stdout(Stdio::null())
.status()?;
lock.unlock();
Ok(())