def get_git_rev():
    return sh_str("git rev-parse --short HEAD")
Return git revision.  Assumes $cwd is within the repository.
dataset/ETHPy150Open freenas/freenas-build/build/tools/checkout.py/get_git_rev