Use git rev-list --first-parent when checking out git repositories when CLEANDATE is set
This way we only check out a previous state of the requested branch. For example, if the history looks like: * (merge) commit 4 |\ | * commit 3 | | | * commit 2 |/ * commit 1 If a commit before 3 is requested, previously, commit 2 would be selected. With --first-parent, we only follow the left path, and commit 1 is selected. This avoids checking out the intermediate state on a feature branch.