Commit graph

6 commits

Author SHA1 Message Date
2e0952f9fb
feat: add colored output with distinct symbols using the colored crate
Add a centralized ui module with Arc's visual identity: colored commit
IDs (magenta), bookmarks (cyan), tags (yellow), status symbols, and
diff highlighting. Update all command output and tests accordingly.
2026-02-09 03:51:59 +00:00
d7694737de
feat: implement phase 9 - git bridge and remotes
- Add git2 dependency with vendored libgit2/openssl for nix compatibility
- Add src/remote.rs: remote add/rm/list with YAML persistence (.arc/remotes.yml)
- Add src/bridge.rs: git bridge with shadow repo (.arc/git/) and commit mapping
  - arc-to-git conversion: materialize trees, create git commits via TreeBuilder
  - git-to-arc conversion: walk git trees, compute deltas, create arc commits
  - Bidirectional mapping cache in .arc/git-map.yml
- Implement push: convert arc commits to git, push bookmarks as branches and
  tags as git tags (rules 19/20) via git2 with SSH agent support
- Implement pull: fetch from remote, import new commits, fast-forward bookmarks
- Implement clone: git2 clone into shadow repo, import all history, set up
  worktree at specified branch with origin remote auto-configured
- Implement migrate: convert existing git repo to arc, preserving all branches
  as bookmarks, tags, commit history, and git remotes
- Implement sync: ensure shadow git mirrors arc refs, optionally push to remote
- Wire all CLI stubs (push/pull/clone/migrate/sync/remote) to implementations
- Add new error variants: Git, RemoteNotFound, RemoteAlreadyExists, etc.
- Exclude .git/ from worktree scanning alongside .arc/ for coexistence
- Update flake.nix with cmake/perl/git build inputs for vendored compilation
- Add 23 new integration tests (16 bridge + 7 remote) covering all commands
2026-02-08 02:53:12 +00:00
ea07d74457
feat: implement stash system (phase 7)
Add named stash support with create, use, push, pop, rm, and list
commands. Stashes are stored as YAML in .arc/stashes/named/ with a
stack-based push/pop model. Active stash tracked in state.yml.

- stash push saves dirty changes and resets worktree to clean state
- stash pop requires clean worktree and matching HEAD base commit
- 28 integration tests covering all commands and edge cases
- new error variants: StashAlreadyExists, StashNotFound, NoActiveStash,
  NothingToStash, StashEmpty, StashBaseMismatch
2026-02-07 16:48:54 +00:00
8a2a189576
feat: implement bookmarks, tags, and switch (phase 5)
- Add src/refs.rs with mark_add/rm/list/rename, tag_add/rm/list, switch
- Bookmarks stored as YAML RefTarget files in .arc/bookmarks/
- Tags stored as YAML RefTarget files in .arc/tags/ (immutable)
- Switch reconstructs worktree from delta chain, checks for dirty state
- Add error variants: BookmarkNotFound, BookmarkAlreadyExists, TagNotFound,
  TagAlreadyExists, CannotRemoveActiveMark, DirtyWorktree
- Wire up CLI dispatch for mark, tag, and switch commands
- Fix cli.rs tests to run mark/tag list within a repo context
- Add 35 new tests across tests/mark.rs, tests/tag.rs, tests/switch.rs
2026-02-06 18:31:31 +00:00
dca6a9ae76
feat: implement phase 2 core repo structure
- Add Repository struct with init/open/discover methods
- Create .arc/ directory layout: commits/, bookmarks/, tags/, stashes/, HEAD, config.yml
- Define data model types: Commit, Delta, FileChange, Head, RefTarget with serde derives
- Implement YAML config with local/global resolution and EffectiveConfig merging
- Implement .arcignore/.ignore file parsing
- Add error module with ArcError type
- Wire arc init command to create real repository structure
- Add serde, serde_yaml, rmp-serde dependencies; tempfile dev-dependency
- Add 16 new integration tests across init, config, ignore, and model test files
2026-02-06 18:06:13 +00:00
c2eb9f42ba
feat: project scaffolding with nix flake, direnv, and CLI skeleton
- Nix flake with nixpkgs-unstable, flake-parts, fenix, and crane
- .envrc for direnv integration
- Rust project with clap-based CLI covering all planned commands
- Subcommands: init, commit, log, status, diff, switch, merge, show,
  history, revert, reset, push, pull, clone, migrate, mark, tag,
  stash, graft, config, sync, remote
- Integration tests for CLI help, version, and subcommand parsing
- All commands print placeholder output for future implementation
2026-02-06 17:55:42 +00:00