@staticmethod
    def ensureIsWorkingDirectory(path):
        """
        Ensure that C{path} is a Git working directory.

        @type path: L{twisted.python.filepath.FilePath}
        @param path: The path to check.
        """
        try:
            runCommand(["git", "rev-parse"], cwd=path.path)
        except (CommandFailed, __HOLE__):
            raise NotWorkingDirectory(
                "%s does not appear to be a Git repository."
                % (path.path,))
dataset/ETHPy150Open twisted/twisted/twisted/python/_release.py/GitCommand.ensureIsWorkingDirectory