FYI. We're about to incorporate libgit2 into the build system, so we can begin the rewrite of Pkg to use it instead of shelling out to command-line git. libgit2 can only be built via cmake. So, if you're building master from source, you'll need cmake to be installed once pull request 8820 is merged. See https://github.com/JuliaLang/julia/pull/8820 for details (and the proposed changes to the readme to indicate this information).
Happy hacking, Tony