def METHOD_NAME(self, ref):
    self.window.run_command("gs_compare_commit", {
        "file_path": self._file_path,
        "base_commit": self._base_commit if self._base_commit else ref,
        "target_commit": self._target_commit if self._target_commit else ref
    })