Pure C implementation of the Git core methods