Skip to content

Perform git clean -fdx during make clean

The git clean command should only remove untracked files, but might be considered dangerous to do. It won't affect any files that are part of the repository, so local changes to source code shouldn't be affected.

This helped me in the situation where I had a failed make check execution, and make thought that it had successfully executed some targets that it hadn't, so didn't rerun them all.

An alternative might be to include more rm commands, rather than a blanket git clean -fdx command, although that has the disadvantage of needing more careful maintenance. Another disadvantage of having a git command here is if somebody, for some reason, was storing cvs-fast-export source code in a non-git repository...

I'll let you decide what you think! :)

Merge request reports