'Ensure that C{path} is a Git working directory.
@type path: L{twisted.python.filepath.FilePath}
@param path: The path to check.'

@staticmethod
def ensureIsWorkingDirectory(path):

    try:
        runCommand(['git', 'rev-parse'], cwd=path.path)
    except (CalledProcessError, OSError):
        raise NotWorkingDirectory(('%s    does    not    appear    to    be    a    Git    repository.' % (path.path,)))
