code: def do_read_info_from_repo(self):
      repo = None
      try:
          if os.path.exists(os.path.join(self.path, ".git")):
              repo = Repo(self.path)
      except Exception:
          errors.report(
              f"Error reading github repository info from {self.path}",
              exc_info=True,
          )
  
      if repo is None or repo.bare:
          self.remote = None
      else:
          try:
              self.remote = next(repo.remote().urls, None)
              commit = repo.head.commit
              self.commit_date = commit.committed_date
              if repo.active_branch:
                  self.branch = repo.active_branch.name
              self.commit_hash = commit.hexsha
              self.version = self.commit_hash[:8]
  
          except Exception:
              errors.report(
                  f"Failed reading extension data from Git repository ({self.name})",
                  exc_info=True,
              )
              self.remote = None
  
      self.have_info_from_repo = True
  
imports: from __future__ import annotations
  import configparser
  import os
  import threading
  import re
  from modules import shared, errors, cache, scripts
  from modules.gitpython_hack import Repo
  from modules.paths_internal import extensions_dir, extensions_builtin_dir, script_path
label_desc: Use image node_id 5 for calling the Extension obj's underlying member method code with example usage: obj.do_read_info_from_repo() without return types