Skip to content

Revert "add_lang_ext_support_to_diff"#1868

Closed
Saga4 wants to merge 1 commit intomainfrom
revert-1858-fix/add_lang_ext_support_to_diff
Closed

Revert "add_lang_ext_support_to_diff"#1868
Saga4 wants to merge 1 commit intomainfrom
revert-1858-fix/add_lang_ext_support_to_diff

Conversation

@Saga4
Copy link
Contributor

@Saga4 Saga4 commented Mar 18, 2026

Reverts #1858

@Saga4 Saga4 closed this Mar 18, 2026
@claude
Copy link
Contributor

claude bot commented Mar 18, 2026

Claude finished @Saga4's task in 2m 46s —— View job


PR Review Summary

  • Triage
  • Lint & type check
  • Resolve stale threads
  • Code review
  • Duplicate detection
  • Test coverage
  • Merge optimization PRs

Prek Checks

No changed source files to lint (the PR only removes lines). Prek reported no issues.

Code Review

This PR reverts #1858, which added two lines to codeflash/code_utils/git_utils.py:

# Removed by this revert:
from codeflash.languages.registry import get_supported_extensions   # line 16
supported_extensions = set(get_supported_extensions())              # line 42 in get_git_diff()

Behavioral change: Before #1858, get_git_diff filtered diffs to only the current language's file extensions (current_language_support().file_extensions, line 31). PR #1858 changed it to filter by all supported language extensions (get_supported_extensions()), but this created a bug: line 31's assignment was silently dead code because line 42 immediately overrode it.

The revert is correct and clean — removing lines 16 and 42 restores the original behavior where only the current language's extensions are tracked. Line 31 (supported_extensions = current_language_support().file_extensions) was always present and is now operative again.

No bugs, no security issues, no breaking API changes.

Duplicate Detection

No duplicates detected. The removed import was only used in get_git_diff.

Test Coverage

tests/test_git_utils.py exists but does not test the extension-filtering logic in get_git_diff. No coverage change from this revert (lines removed, not added).

Merged Optimization PRs


Last updated: 2026-03-18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant