Skip to content

Remove --contrib flag from repo add command #64

@nicabarnimble

Description

@nicabarnimble

Summary

The --contrib flag on patina repo add tries to turn a reference repo into a contribution workspace. This violates unix-philosophy (one tool, one job) and creates an awkward workflow.

Problem

Reference repos with --contrib:

  • Live in ~/.patina/cache/repos/ - not where developers work
  • Use shallow clone (--depth 1) - limited git history
  • No pre-commit hooks installed
  • Awkward to navigate: cd ~/.patina/cache/repos/dojo

Current Behavior

patina repo add dojoengine/dojo --contrib
# Creates fork, but repo is in cache directory
# No hooks, shallow clone, weird location

Recommended Behavior

Reference repos should be read-only for querying:

# For learning/querying
patina repo add dojoengine/dojo
patina scry "spawn patterns" --repo dojo

# For contributing - use proper clone
cd ~/Projects
git clone https://github.com/dojoengine/dojo
cd dojo
patina init .  # Full workspace with hooks, history, secrets protection

Tasks

  • Remove --contrib flag from RepoCommands::Add
  • Remove create_fork() and upgrade_to_contrib() functions
  • Remove contrib and fork fields from RepoEntry (or keep for future use)
  • Update any documentation mentioning --contrib
  • Add note in patina repo add output: "For contributing, clone locally and run patina init ."

References

  • src/commands/repo/mod.rs - CLI definition
  • src/commands/repo/internal.rs - Implementation (lines 152-163, 675-732)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions