first (and messy) attempt to implement git smart http