Commit graph

6 commits

Author SHA1 Message Date
686190a4fc
fix: GPG signed commit test fails in nix build
The test hardcoded 'refs/heads/main' for update-ref, but without
init.defaultBranch config (as in nix sandbox), git defaults to 'master'.
This caused the signed commit to be on a different branch than HEAD,
so arc log showed the unsigned commit instead.

Use 'git symbolic-ref HEAD' to get the actual branch name.
Also fix missing blank line separator between header and body.
2026-02-10 21:53:31 +00:00
dd5b3f0b06
add backwards compat for gpg signed commits
Detect GPG vs SSH signatures when displaying commits. GPG-signed
commits from cloned/migrated git repos now show as valid with the
issuer key ID instead of failing SSH signature verification.
2026-02-10 21:37:52 +00:00
f73878c555
feat: preserve commit signatures across git bridge operations
- Extract git commit signatures (gpgsig) during clone, migrate, and pull
- Sign git commits on push/sync when a signing key is configured
- Add tests for signature preservation and signed push
2026-02-10 21:24:12 +00:00
d4cd32454e
fix migrate reporting wrong commit count
The imported counter was incrementing once per ref processed, not once
per commit converted. Since git_to_arc recursively walks the entire
ancestor chain, a single ref import would convert all reachable commits
but only count as 1.

Fix by measuring the growth of the git-to-arc map before and after the
import loop. Also strengthen tests to assert exact counts for commits,
bookmarks, and tags.
2026-02-09 17:58:03 +00:00
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