Set the index entry to point to a given commit.
This sets the index entry id to the commit id, changes the mode to COMMIT and updates the timestamps to when the commit was made.
a IndexEntry.
a Commit.