class_docstr: Base class for repository detection 
class_docstr_tok: ["Base","class","for","repository","detection"]
docstr: Get repository information.
  :param path: Path to repository
  :param include_diff: Whether to include the diff command's output (if available)
  :param diff_from_remote: Whether to store the remote diff/commit based on the remote commit (not local commit)
  :return: RepoInfo instance
docstr_tok: ["Get","repository","information",".",":","param","path",":","Path","to","repository",":","param","include_diff",":","Whether","to","include","the","diff","command","'s","output","(","if","available",")",":","param","diff_from_remote",":","Whether","to","store","the","remote","diff\/commit","based","on","the","remote","commit","(","not","local","commit",")",":","return",":","RepoInfo","instance"]
code: def _get_info(self, path, include_diff=False, diff_from_remote=False):
      """
      Get repository information.
      :param path: Path to repository
      :param include_diff: Whether to include the diff command's output (if available)
      :param diff_from_remote: Whether to store the remote diff/commit based on the remote commit (not local commit)
      :return: RepoInfo instance
      """
      path = str(path)
      commands = self._get_commands()
      if not include_diff:
          commands.diff = None
  
      # skip the local commands
      if diff_from_remote and commands:
          for name, command in attr.asdict(commands).items():
              if name.endswith(self._remote) and command:
                  setattr(commands, name[: -len(self._remote)], None)
  
      info = Result(
          **{
              name: self._get_command_output(
                  path,
                  name,
                  command,
                  commands=commands,
                  strip=bool(name != "diff"),
              )
              for name, command in attr.asdict(commands).items()
              if command
              and not name.endswith(self._fallback)
              and not name.endswith(self._remote)
          }
      )
  
      if diff_from_remote and commands:
          for name, command in attr.asdict(commands).items():
              if name.endswith(self._remote) and command:
                  setattr(
                      commands,
                      name[: -len(self._remote)],
                      command + [info.branch],
                  )
  
          info = attr.assoc(
              info,
              **{
                  name[: -len(self._remote)]: self._get_command_output(
                      path,
                      name[: -len(self._remote)],
                      command + [info.branch],
                      commands=commands,
                      strip=not name.startswith("diff"),
                  )
                  for name, command in attr.asdict(commands).items()
                  if command
                  and (
                      name.endswith(self._remote)
                      and not name[: -len(self._remote)].endswith(
                          self._fallback
                      )
                  )
              },
          )
          # make sure we match the modified with the git remote diff state
          info.modified = bool(info.diff)
  
      return info
  
imports: import abc
  import os
  from subprocess import call, CalledProcessError
  import attr
  import six
  from pathlib2 import Path
  from ....config.defs import VCS_REPO_TYPE, VCS_DIFF, VCS_STATUS, VCS_ROOT, VCS_BRANCH, VCS_COMMIT_ID, VCS_REPOSITORY_URL
  from ....debugging import get_logger
  from .util import get_command_output
label_desc: Use image node_id 5 for calling the Detector obj's underlying member method code with example usage: obj._get_info(path, include_diff, diff_from_remote) and returns: info