use git fetch instead of git clone. git clone is lacking in that it does
not permit cloning at a specific rev. when paired with --branch flag,
there is no guarantee if the required rev is available in the shallow
clone.
with git fetch however, we are able to fetch a specific rev. the steps are a little more involved however:
git init
git remote add origin <url>
git fetch --depth=<d> --recurse-submodules=<yes|no> <sha>
git checkout FETCH_HEAD
Signed-off-by: oppiliappan me@oppi.li