When in the middle of a merge, the index needs to contain several files with the same name. git_index_insert() used to prevent this by not adding a new entry if an entry with the same name already existed.