code: def load_config(path=None):
      
      # NOTE: Initially I wanted to inherit Path to encapsulate Git access
      # there but there's no easy way to subclass pathlib.Path :(
      head_sha = get_sha1_from("HEAD")
      revision = head_sha
      saved_config_path = load_val_from_git_cfg("config_path")
      if not path and saved_config_path is not None:
          path = saved_config_path
  
      if path is None:
          path = find_config(revision=revision)
      else:
          if ":" not in path:
              path = f"{head_sha}:{path}"
  
              revision, _col, _path = path.partition(":")
              if not revision:
                  revision = head_sha
  
      config = DEFAULT_CONFIG
  
      if path is not None:
          config_text = from_git_rev_read(path)
          d = toml.loads(config_text)
          config = config.new_child(d)
  
      return path, config
docs: Choose and return the config path and it's contents as dict.