rerere: Separate libgit and builtin functions