feat: add --onto and fork-point support to git_rebase (#159)#160
Conversation
Add usage examples to docstring showing cached and dry_run variants. Parse GitCommandError stderr to distinguish 'file not found' (pathspec unmatched) from 'uncommitted changes' (local modifications or staged changes) instead of returning generic failure message. 42 tests passing (was 40). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @MementoRC's task —— View job Pull Request Review - feat: add --onto and fork-point support to git_rebaseI've completed a thorough review of this PR. Here's my comprehensive analysis: Overall Assessment ✅This is a well-implemented feature that adds valuable Code Quality & ArchitectureStrengths:
Minor Issues:
Security Analysis ✅No security concerns identified:
Test Coverage Analysis ✅Excellent test coverage (
Test quality is high:
Performance Considerations ✅No performance concerns:
Specific Code Reviewmodels.py:132-134onto: str | None = Field(default=None, description="Rebase --onto target (new base)")
fork_point: str | None = Field(default=None, description="Fork point / old base for --onto")
branch: str | None = Field(default=None, description="Branch to rebase (default: current HEAD)")✅ Good: Clear field definitions with helpful descriptions operations.py:1461-1465 (Validation Logic)if onto and not fork_point:
return "❌ --onto requires fork_point (the old base to rebase from)"
if fork_point and not onto:
return "❌ fork_point requires --onto (the new base to rebase onto)"✅ Good: Proper validation ensures parameters are used correctly operations.py:1485-1493 (Command Building)if onto:
args = ["--onto", onto, fork_point]
if branch:
args.append(branch)
elif branch:
args = [target_branch, branch]
else:
args = [target_branch]✅ Good: Clean logic that correctly constructs git command arguments Recommendations
Cherry-picked git_rm Changes ✅The inclusion of git_rm improvements ( Final AssessmentThis PR represents high-quality work that:
Recommendation: APPROVE 🚀 The implementation is solid, well-tested, and adds valuable functionality to the MCP Git server. |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @MementoRC's task —— View job Pull Request Review - feat: add --onto and fork-point support to git_rebaseI've completed a comprehensive review of this PR. Here's my analysis: Review Checklist:
Overall Assessment ✅This is a well-implemented feature that adds valuable Code Quality & ArchitectureStrengths:
Minor Issues:
Security Analysis ✅No security concerns identified:
Test Coverage Analysis ✅Excellent test coverage (
Test quality is high:
Performance Considerations ✅No performance concerns:
Specific Code Reviewmodels.py:136-138onto: str | None = Field(default=None, description="Rebase --onto target (new base)")
fork_point: str | None = Field(default=None, description="Fork point / old base for --onto")
branch: str | None = Field(default=None, description="Branch to rebase (default: current HEAD)")✅ Good: Clear field definitions with helpful descriptions operations.py:1465-1468 (Validation Logic)if onto and not fork_point:
return "❌ --onto requires fork_point (the old base to rebase from)"
if fork_point and not onto:
return "❌ fork_point requires --onto (the new base to rebase onto)"✅ Good: Proper validation ensures parameters are used correctly operations.py:1489-1496 (Command Building)if onto:
args = ["--onto", onto, fork_point]
if branch:
args.append(branch)
elif branch:
args = [target_branch, branch]
else:
args = [target_branch]✅ Good: Clean logic that correctly constructs git command arguments Additional Features ReviewGitCommit allow_empty Flag ✅The addition of the
Cherry-picked git_rm Improvements ✅The inclusion of git_rm improvements (
Registry Description Update ✅The updated description in description="Rebase branch onto another. Supports --onto <new_base> <fork_point> [<branch>] for moving branches between bases"Recommendations
Final AssessmentThis PR represents high-quality work that:
Recommendation: APPROVE 🚀 The implementation is solid, well-tested, and adds valuable functionality to the MCP Git server. |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @MementoRC's task —— View job Pull Request Review - feat: add --onto and fork-point support to git_rebaseI've completed a comprehensive review of this PR. Here's my analysis: Review Checklist:
Overall Assessment ✅This is a well-implemented feature that adds valuable Code Quality & ArchitectureStrengths:
Minor Issues:
Security Analysis ✅No security concerns identified:
Test Coverage Analysis ✅Excellent test coverage (
Test quality is high:
Performance Considerations ✅No performance concerns:
Specific Code Reviewmodels.py:136-138onto: str | None = Field(default=None, description="Rebase --onto target (new base)")
fork_point: str | None = Field(default=None, description="Fork point / old base for --onto")
branch: str | None = Field(default=None, description="Branch to rebase (default: current HEAD)")✅ Good: Clear field definitions with helpful descriptions operations.py:1465-1468 (Validation Logic)if onto and not fork_point:
return "❌ --onto requires fork_point (the old base to rebase from)"
if fork_point and not onto:
return "❌ fork_point requires --onto (the new base to rebase onto)"✅ Good: Proper validation ensures parameters are used correctly operations.py:1489-1496 (Command Building)if onto:
args = ["--onto", onto, fork_point]
if branch:
args.append(branch)
elif branch:
args = [target_branch, branch]
else:
args = [target_branch]✅ Good: Clean logic that correctly constructs git command arguments Additional Features ReviewGitCommit allow_empty Flag ✅The addition of the
Cherry-picked git_rm Improvements ✅The inclusion of git_rm improvements (
Registry Description Update ✅The updated description in description="Rebase branch onto another. Supports --onto <new_base> <fork_point> [<branch>] for moving branches between bases"Recommendations
Final AssessmentThis PR represents high-quality work that:
Recommendation: APPROVE 🚀 The implementation is solid, well-tested, and adds valuable functionality to the MCP Git server. |
Closes #159
Summary
onto,fork_point,branchoptional params toGitRebasemodel--onto new-base old-base [branch]onto/fork_pointmust be provided together--ontois used (user supplies exact refs)allow_emptyflag togit_commitfor empty commits (CI triggers, merge markers)Test plan
🤖 Generated with Claude Code