Skip to content

fix: add meta-aware git help - #26

Merged
mateodelnorte merged 3 commits into
mainfrom
tasks-harmony-677
May 19, 2026
Merged

mateodelnorte merged 3 commits into
mainfrom
tasks-harmony-677

Conversation

@mateodelnorte

@mateodelnorte mateodelnorte commented May 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add meta-aware help for pass-through commands like meta git pull --help, fetch, and checkout
  • keep worktree and snapshot child help command-specific
  • add meta git worktree create --dry-run planning output for custom worktree operations

Verification

  • cargo fmt --all
  • cargo test -q --workspace
  • cargo build --workspace --quiet
  • bats tests/help.bats

Implements [[tasks/harmony-677]]

Summary by CodeRabbit

  • New Features

    • Added --dry-run flag to the worktree create command for previewing planned operations without executing them.
    • Enhanced help text handling for snapshot and passthrough git commands.
  • Chores

    • Updated CI and automation workflows to reference new organization configuration.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 19, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@mateodelnorte has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 1 minute and 3 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 92931969-7e45-426d-8fd5-5490f5cff6f4

📥 Commits

Reviewing files that changed from the base of the PR and between bd152df and 5f2223b.

📒 Files selected for processing (1)
  • src/commands/worktree/create.rs

Walkthrough

This PR introduces three independent changes: a GitHub organization migration from harmony-labs to gitkb in CI workflows, a new --dry-run flag for the worktree create command that previews operations without execution, and enhanced help routing for snapshot and pass-through git commands.

Changes

Organization Migration to gitkb

Layer / File(s) Summary
Workflow organization references
.github/workflows/auto-format.yml, .github/workflows/ci.yml, .github/workflows/notify-parent.yml
Updated all git clone URLs and workspace metadata repository fields to use gitkb GitHub org instead of harmony-labs across auto-format, CI test/clippy jobs, and parent dispatch configuration.

Worktree Dry-Run and Help System

Layer / File(s) Summary
Dry-run CLI definition and dispatcher
src/commands/worktree/cli_types.rs, src/commands/worktree/mod.rs
Added dry_run: bool field to CreateArgs, extended execute_worktree_command signature to accept a dry_run parameter, implemented flag injection in the dispatcher when create subcommand is matched with dry_run=true, and updated worktree help text to document the new --dry-run option.
Dry-run execution and printing
src/commands/worktree/create.rs, src/commands/worktree/exec.rs
Implemented early return logic in handle_create that previews planned worktree operations (start ref, PR source, ephemeral/TTL config, per-repo git worktree add commands) via new print_create_dry_run and shell_quote helpers; reordered from_pr resolution to occur after the dry-run check; ensured ephemeral exec explicitly sets dry_run: false.
Help detection and routing system
src/lib.rs, src/snapshot.rs
Added has_help_token helper to detect --help/-h across command and args, created execute_snapshot_command_help to route snapshot subcommand-specific help, and implemented build_passthrough_git_help to synthesize help for non-meta git subcommands scoped to discovered project directories.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • gitkb/meta_git_cli#25: Modifies execute_worktree_command signature and injects a clap argument flag (--recursive) into the dispatcher, directly related to the dry-run dispatch and argument-injection pattern in this PR.

Poem

🐰 Hopping through repos with a dry-run so neat,
Preview your moves before they complete,
Help texts now shine with routes that flow,
From gitkb org, our migrations all glow! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: add meta-aware git help' directly aligns with the primary objective of adding meta-aware help for pass-through commands like git pull, fetch, and checkout.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tasks-harmony-677

Comment @coderabbitai help to get the list of available commands and usage tips.

@mateodelnorte
mateodelnorte merged commit ac7ab64 into main May 19, 2026
7 checks passed
@mateodelnorte
mateodelnorte deleted the tasks-harmony-677 branch May 19, 2026 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant