feat: allow local repo reference clones to save disk
Use git --reference-if-able when a local repo is provided so rigs and crew share objects without changing remotes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -72,8 +72,17 @@ func (m *Manager) Add(name string, createBranch bool) (*CrewWorker, error) {
|
||||
}
|
||||
|
||||
// Clone the rig repo
|
||||
if err := m.git.Clone(m.rig.GitURL, crewPath); err != nil {
|
||||
return nil, fmt.Errorf("cloning rig: %w", err)
|
||||
if m.rig.LocalRepo != "" {
|
||||
if err := m.git.CloneWithReference(m.rig.GitURL, crewPath, m.rig.LocalRepo); err != nil {
|
||||
fmt.Printf("Warning: could not clone with local repo reference: %v\n", err)
|
||||
if err := m.git.Clone(m.rig.GitURL, crewPath); err != nil {
|
||||
return nil, fmt.Errorf("cloning rig: %w", err)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if err := m.git.Clone(m.rig.GitURL, crewPath); err != nil {
|
||||
return nil, fmt.Errorf("cloning rig: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
crewGit := git.NewGit(crewPath)
|
||||
|
||||
Reference in New Issue
Block a user