diff --git a/megalinter/MegaLinter.py b/megalinter/MegaLinter.py index a7106152dd4..93e5e9ed0f8 100644 --- a/megalinter/MegaLinter.py +++ b/megalinter/MegaLinter.py @@ -773,10 +773,10 @@ def list_files_git_diff(self): "HEAD" if default_branch == "HEAD" else f"refs/heads/{default_branch}" ) local_ref = f"refs/remotes/{default_branch_remote}" - # Try to fetch default_branch from origin, because it'sn't cached locally. + # Try to fetch default_branch from origin, because it isn't cached locally. repo.git.fetch("origin", f"{remote_ref}:{local_ref}") # Make git diff to list files (and exclude symlinks) - diff = repo.git.diff(default_branch_remote, name_only=True) + diff = repo.git.diff(f"{default_branch_remote}...", name_only=True) logging.info(f"Modified files:\n{diff}") all_files = list() for diff_line in diff.splitlines():