sloch reworked to use pipes, generified a little bit for git support