ouch, how did this came in. Regarding when to return the idBuffer you are of course right ... - I'll propose a fix for that now.

Regarding the index update: When the index is updated is currently not in the scope of this change. We are never under the hood updating the index. Do you know when 'git status/diff' update the index? I could imagine that it definitely make sense to correct the smudged status of index entries when during a walk get real info about whether a file is dirty or not.