Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix codebase.checkout() wiping out .gitignore'd files #638

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

devin-ai-integration[bot]
Copy link
Contributor

This PR fixes an issue where codebase.checkout() was wiping out .gitignore'd files like node_modules and the .codegen folder. The fix uses git stash/pop to preserve these files during checkout instead of using discard_changes() which removes them.

Reproduction steps:

  • Parse a codebase with Codebase('./')
  • Make some changes/do a codemod
  • Call codebase.commit()
  • Make some changes manually in the file (not via a codemod)
  • Call codebase.checkout(commit="...")

Link to Devin run: https://app.devin.ai/sessions/f1f4c35acc5e4d9799e996c613b691a6
Requested by: [email protected]

@devin-ai-integration devin-ai-integration bot requested review from codegen-team and a team as code owners February 25, 2025 17:21
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add "(aside)" to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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.

0 participants