Create a new Git index object as a memory representation of the Git index file in 'index_path', without a repository to back it.
Since there is no ODB behind this index, any Index methods which rely on the ODB (e.g. index_add) will fail with the GIT_EBAREINDEX error code.
the path to the index file in disk
0 on success; error code otherwise