Create a new indexer instance
to the directory where the packfile should be stored
permissions to use creating packfile or 0 for defaults
object database from which to read base objects when fixing thin packs. Pass NULL if no thin pack is expected (an error will be returned if there are bases missing)
0 or an error code.