better performance for git functions