Find the first index of any entires which point to given path in the Git index.
an existing index object
path to search
an index >= 0 if found, -1 otherwise