Have git inject the commit hash into GITHASH when archiving, we can amend version.sh to look for and use this for exported sources.
(cherry picked from commit 4a2a789e7dbb3302f158bfd607ac55b482f12ee2)
Add branch to GITHASH, approximating the string produced by git-describe
(cherry picked from commit d74248e6b3447c3a7e1deb0212cc69e664b89085)