I think this code should be in JGit. What you suggest is a "git checkout -- <path>", right? That's pure git logic and we should try to  keep such things in JGit. A good place for that would be in  CheckoutCommand. If we would add a method "addPath(String path)" there then we could move this code to the right location. Then other user's of the JGit API could make use of this code.

Sorry, I know I am late with this comment - and I was about to let commit this change and refactor it directly afterwards. But: officially copying code from EGit to JGit is because of the licenses not so easy.
So better put the code right now.