def METHOD_NAME():
    # git rev-parse --show-toplevel
    p = subprocess.Popen(["git", "rev-parse", "--show-toplevel"], stdout=subprocess.PIPE)
    dir = p.communicate()[0].strip()
    returncode = p.returncode
    if returncode == 0:
        return dir
    else:
        sys.stderr.write("Not a git repository. Could not find .git\n")
        sys.exit(os.EX_CONFIG)