Skip to content

feat: add support for non-colocated jj repos - #308

Open
npikall wants to merge 3 commits into
caarlos0:mainfrom
npikall:push-xrovmlwosqlr
Open

npikall wants to merge 3 commits into
caarlos0:mainfrom
npikall:push-xrovmlwosqlr

Conversation

@npikall

@npikall npikall commented Nov 10, 2026

Copy link
Copy Markdown

I’m a big fan of @caarlos0’s tools; he usually has already built whatever I’m looking for. I use jj-vcs as my primary VCS, and svu currently only supports git repos. Since jj is git-compatible, supporting it seemed like a natural fit.

Disclosure: most of this code was AI-generated. I’ve reviewed and tested it as described below, but I’m happy to rework anything. If you’d rather review it in smaller pieces, I can split the PR.

Every commit in this PR builds and passes the test suite on its own (go build && go test ./... && golangci-lint run), so it can be reviewed and bisected commit by commit.

What it does

  • Detects the nearest .git /.jj marker.
  • Colocated repos keep using the existing git code path, so nothing changes for them.
  • Non-colocated jj repos read tags and history through the jj CLI.
  • Git logic moves behind a backend interface in internal/vcs, and tag/log parsing is shared between backends.

Testing

  • Unit Tests added
  • Manually tested on a colocated repo and a non-colocated repo

Happy to hear whether this is something you’d want in svu at all, even before a detailed review.

Detect the nearest .git/.jj marker and read tags and history through the
jj CLI when the repo is not colocated. Git code moves behind a backend
interface in internal/vcs; tag/log parsing is shared.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant