Add or update an index entry from a file in disk
The file path
must be relative to the repository's
working folder and must be readable.
This method will fail in bare index instances.
filename to add
stage for the entry
0 on success, otherwise an error code