Repository#commit doesn't create commit object when index is empty