-
Notifications
You must be signed in to change notification settings - Fork 3
Fix handling of '.' as tree_path in get_tree function #20
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
Conversation
When tree_path is '.', the current code constructs invalid paths like '/path/to/repo./' which causes "Invalid directory path" errors. This fix adds special handling for '.' (current directory) to avoid path modification while still handling .git suffix removal properly. Fixes #19 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
TitleFix handling of '.' as tree_path in get_tree function User descriptionWhen tree_path is '.', the current code constructs invalid paths like '/path/to/repo./' which causes "Invalid directory path" errors. This fix adds special handling for '.' (current directory) to avoid path modification while still handling .git suffix removal properly. Fixes #19 🤖 Generated with Claude Code PR TypeBug fix Description
Changes diagramflowchart LR
A["tree_path input"] --> B{"tree_path == '.'?"}
B -->|Yes| C["Handle current directory"]
B -->|No| D["Original path logic"]
C --> E{"path has .git suffix?"}
E -->|Yes| F["Remove .git suffix"]
E -->|No| G["Use path as-is"]
D --> H["Append '/' and process"]
F --> I["Return processed path"]
G --> I
H --> I
Changes walkthrough 📝
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
|
Seems like a easy review fix, forgotten, tentatively adding to the next sprint. |
Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
tcornell-bus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label
|
|||||||||||||||||||||||||||
When tree_path is '.', the current code constructs invalid paths like '/path/to/repo./' which causes "Invalid directory path" errors.
This fix adds special handling for '.' (current directory) to avoid path modification while still handling .git suffix removal properly.
Fixes #19
🤖 Generated with Claude Code