pkg/vcs: run git clean with switching commits

Maybe it will help to fix:
https://groups.google.com/forum/#!topic/syzkaller-bugs/2lgvlHd8t1c
This commit is contained in:
Dmitry Vyukov 2020-05-25 14:42:46 +02:00
parent 73964a9b3a
commit 30927cd7ca

View File

@ -145,6 +145,7 @@ func (git *git) clone(repo, branch string) error {
func (git *git) reset() {
// This function tries to reset git repo state to a known clean state.
git.git("reset", "--hard")
git.git("clean", "-fd")
git.git("bisect", "reset")
git.git("reset", "--hard")
}