I think we should clean that up in a different way: 

AFAIK we do no longer have a difference between "add to index" and "track", so I think we should delete the track() here and replace it by addToIndex().

In addition we could use the jgit AddCommand to heavily simplify this class.