Fix issue #9: symbolic link error#14
Conversation
|
@chand1012 I think symlinks shouldn't be skipped but rather resolved. |
|
@openhands-agent can you make the symlinks resolve rather than skipping over them? |
Overview of ChangesThe changes successfully address the issue with symbolic links in the git2gpt tool. Previously, the tool would skip symbolic links entirely, causing problems with repositories that use them (like Laravel's storage link). Key improvements:
All issues appear to be successfully resolved. The tool should now process repositories with symbolic links without errors or omissions. |
|
@chand1012 @openhands-agent great. It seems the major issue in the diff that "tabs" replaced with "spaces" for the entire |
This pull request fixes #9.
The issue has been successfully resolved by adding code to skip symbolic links during repository processing. The key change was in the
processRepositoryfunction inprompt/prompt.go, where a check was added to detect and skip symbolic links:This change specifically addresses the reported issue where Laravel's symbolic link from
/storagetopublic/storagewas causing git2gpt to fail with the error "read Codes/public/storage: is a directory". By detecting and skipping symbolic links, the tool will no longer attempt to traverse these links, preventing the error.The PR also includes a test case (
TestSymlinkHandlingincmd/symlink_test.go) that verifies the fix works correctly by ensuring that:The test setup includes a sample directory structure that mimics the Laravel project structure that was causing the issue, with test files to validate the behavior.
Automatic fix generated by OpenHands 🙌