Support shallow clones for github http

This pull request is a proposed fix for #1250