def temp_repo(self):
        """Create a temporary git repository with test files"""
        import subprocess

        temp_dir = tempfile.mkdtemp()

        # Initialize git repo
        subprocess.run(["git", "init"], cwd=temp_dir, capture_output=True)
        subprocess.run(["git", "config", "user.name", "Test"], cwd=temp_dir, capture_output=True)
        subprocess.run(["git", "config", "user.email", "test@example.com"], cwd=temp_dir, capture_output=True)

        # Create test config file
        config_content = '''"""Test configuration file"""

# Version and metadata
__version__ = "1.0.0"
__author__ = "Test"

# Configuration
MAX_CONTENT_TOKENS = 800_000  # 800K tokens for content
TEMPERATURE_ANALYTICAL = 0.2  # For code review, debugging
'''

        config_path = os.path.join(temp_dir, "config.py")
        with open(config_path, "w") as f:
            f.write(config_content)

        # Add and commit initial version
        subprocess.run(["git", "add", "."], cwd=temp_dir, capture_output=True)
        subprocess.run(["git", "commit", "-m", "Initial commit"], cwd=temp_dir, capture_output=True)

        # Modify config to create a diff
        modified_content = config_content + '\nNEW_SETTING = "test"  # Added setting\n'
        with open(config_path, "w") as f:
            f.write(modified_content)

        yield temp_dir, config_path

        # Cleanup
        import shutil

        shutil.rmtree(temp_dir)
Create a temporary git repository with test files
tests/test_precommit_with_mock_store.py