def git_directories():
    cmd = ("git", "rev-parse", "--show-toplevel", "--git-dir")
    out = run_command_exc(GitDirectoriesException, *cmd)
    try:
        return out.splitlines()
    except ValueError:
        raise GitDirectoriesException(0, out, cmd, {})
Determine (absolute git work directory path, .git subdirectory path).
dataset/ETHPy150Open openstack-infra/git-restack/git_restack/cmd.py/git_directories