tuenti/python-repoman — pull request #3 by jsoriano (2014-08-11 16:36:17+00:00)
Title: Clean index before git reset and when clearing depot

git index is cleaned on clear operations.

`git read-tree empty` is used before `git reset` as `git reset` can have nasty behaviours with unmerged files in the index.

`reset` is used with `pygit2` as it implicitelly cleans the index.

I tried to do a test reproducing the issue we had in Tuenti, but I couldn't, in any case this code is able to recover the working copies we broke.