What does this MR do?
Adds support for
GIT_CLEAN_FLAGS to allow customize the behavior of
- when not defined to use
This is configurable via following statements in
variables: missing GIT_CLEAN_FLAGS # use default, the `-ffdx` GIT_CLEAN_FLAGS: "" # use default, the `-ffdx` GIT_CLEAN_FLAGS: -ffdx -e cache/ GIT_CLEAN_FLAGS: none # disable git clean
This MR also improves performance of checkout in very big (a lot of files) repositories:
- We do not use
git reset --hardas this is not needed, because we already do
git checkout -f,
git checkout -fas this is desired behavior,
- We remove one I/O intensive operation (
git reset --hard), reducing I/O by 33%:
git checkout -fand
git cleanonly which has the same I/O footprint.
Closes #4109 (closed)
Why was this MR needed?
git clean behavior flexible and performant.
Does this MR meet the acceptance criteria?
Added tests for this feature/bug
In case of conflicts with
master- branch was rebased