Skip to content

Commit

Permalink
chore: minor fix
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Selwyn-Smith <[email protected]>
  • Loading branch information
benmss committed Dec 2, 2024
1 parent a2b6ba9 commit e6300cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/macaron/repo_finder/repo_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
from macaron.repo_finder.repo_finder_base import BaseRepoFinder
from macaron.repo_finder.repo_finder_deps_dev import DepsDevRepoFinder
from macaron.repo_finder.repo_finder_java import JavaRepoFinder
from macaron.repo_finder.repo_utils import check_repo_urls_are_equal, generate_report, prepare_repo
from macaron.repo_finder.repo_utils import check_repo_urls_are_equivalent, generate_report, prepare_repo
from macaron.slsa_analyzer.git_url import GIT_REPOS_DIR, list_remote_references

logger: logging.Logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -227,7 +227,7 @@ def find_source(purl_string: str, input_repo: str | None, latest_version_fallbac
logger.error("Could not find repo from latest version of PURL: %s >> %s.", latest_version_purl, purl)
return False

if check_repo_urls_are_equal(found_repo, latest_repo):
if check_repo_urls_are_equivalent(found_repo, latest_repo):
logger.error("Latest version repo is the same as original: %s", latest_repo)
return False

Expand Down
6 changes: 3 additions & 3 deletions src/macaron/repo_finder/repo_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def check_latest_version(purl: PackageURL, repo_path: str, target_dir: str) -> t
if not latest_repo:
return None, "", ""

if check_repo_urls_are_equal(repo_path, latest_repo):
if check_repo_urls_are_equivalent(repo_path, latest_repo):
return None, "", ""

# Try to prepare the new repo.
Expand All @@ -333,8 +333,8 @@ def check_latest_version(purl: PackageURL, repo_path: str, target_dir: str) -> t
return git_obj, latest_repo, digest


def check_repo_urls_are_equal(repo_1: str, repo_2: str) -> bool:
"""Check if the two passed repo URLs are equal.
def check_repo_urls_are_equivalent(repo_1: str, repo_2: str) -> bool:
"""Check if the two passed repo URLs are equivalent.
Parameters
----------
Expand Down

0 comments on commit e6300cc

Please sign in to comment.