Skip to content

feat: status, sync and open across repositories #5

Closed

Description

@simonostendorf

Goal

The state of every managed repository is visible in one command, and they can be refreshed
together.

Context

  • Trigger: fifth milestone, independent of the health issue and runnable in parallel with it.
  • Affected: internal/git, cmd/gitcd.

Reported and to be re-probed here: cloning an empty repository leaves an unborn HEAD, and
git status --porcelain=v2 --branch then prints # branch.oid (initial) and no # branch.ab
line. A branch without an upstream prints no # branch.ab line either. Both cases must render
as a state, never as a crash or a blank column.

sync uses a bounded pool of four. Serialising the first SSH connection per host was considered
and rejected: the agent and ControlMaster already handle the prompt storm.

Also in this milestone, small and parser driven: gitcd open opens the remote in a browser,
built from the existing remote parser.

Acceptance criteria

  • gitcd status prints branch, dirty state and ahead or behind per repository.
  • A repository with an unborn HEAD renders as a state, with a test.
  • A branch without an upstream renders as a state, with a test.
  • gitcd status --json prints the same as structured output.
  • gitcd status exits non zero when any repository is dirty, behind the flag --strict.
  • gitcd sync fetches every repository with a pool of four.
  • gitcd sync reports per repository failures without aborting the run, and exits non zero
    when any failed.
  • gitcd open [query] opens the remote in a browser and --print prints the URL instead.
  • Tests cover the status rendering cases and the failure aggregation. No network.
  • task check passes.

Out of scope

  • prune for repositories whose upstream is gone.
  • --filter=blob:none on clone.
  • Pulling or rebasing. sync fetches only.

Activity

  1. added
    ai: readyScoped + approved for an AI agent to pick up
    ai: workingAn AI agent is implementing (incl. committed but not yet pushed)
    ai: reviewingAn AI agent is reviewing the pushed work
    and removed
    needs triageNot yet triaged by a maintainer
    ai: readyScoped + approved for an AI agent to pick up
    ai: workingAn AI agent is implementing (incl. committed but not yet pushed)
    on Nov 13, 2026
  2. added
    ai: doneAI-reviewed and accepted
    and removed
    ai: reviewingAn AI agent is reviewing the pushed work
    on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai: doneAI-reviewed and acceptedfeatureNew feature or capabilitystack: goRelated to Go code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions