ported hg -> git