def get_git_revision(path):
    """Return the Git describe output for a working directory."""
    try:
        pipe = subprocess.Popen(['git', 'describe', '--always'], stdout=subprocess.PIPE,
                                stderr=subprocess.PIPE)
        stdout, stderr = pipe.communicate()
        rev = stdout.strip()
    except __HOLE__:
        rev = ""
    if not rev:
        rev = "UNKNOWN"
    return rev
dataset/ETHPy150Open dnanexus/dx-toolkit/src/python/test/coveragereport.py/get_git_revision