rewrite git-trail in python to avoid pipe limit