Commit graph

5 commits

Author SHA1 Message Date
Yuya Nishihara
f0131ead40 cli: git: print current Git HEAD by "colocation status"
As I'm going to deprecate git_head()/git_refs() functions, we'll need an
alternative command to debug view.git_head() movement. I think "git colocation
status" is a good place to print this kind of information.

We don't use "debug object view" because I expect git_head and git_refs will be
removed from the view object.
2025-12-10 14:26:47 +00:00
Theo Buehler
cfb6509e38 tests: update cargo insta snapshots
Running "cargo insta test --workspace", results in numerous warnings:

Snapshot test passes but the existing value is in a legacy format.
Please run `cargo insta test --force-update-snapshots` to update to
a newer format.

This commit is the result of running the suggested command.
2025-12-09 18:59:34 +00:00
Martin von Zweigbergk
b409aa3189 colocation: rename from "colocated repo" to "colocated workspace"
Colocation is about sharing the working copy between jj and git. It's
less important where the repo is stored. I therefore think we should
not call it "colocated repo". I considered renaming it to "colocated
working copy" but that sounded awkward in many places because we often
talk about the whole workspace (repo + working copy), so "In colocated
workspaces with a very large number of branches or other refs" sounds
better than "In colocated working copies with a very large number of
branches or other refs".

Once we support colocate workspaces in non-main Git worktrees, I think
this rename will be even more relevant because then all those
workspaces share the same repo but only some of them may be colocated.
2025-11-03 16:53:26 +00:00
Yuya Nishihara
3d43b556c3 cli: git colocation: fix check for non-main workspace
Also removed period from the error message per convention.

Fixes #7812
2025-10-23 01:50:55 +00:00
Angel Ezquerra
3c98f9a7d3 git: add git colocation enable | disable | status commands (fixes #4624)
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
This new command lets you turn a non colocated git repo into a colocated repo or vice-versa (by using the `jj git colocation enable` and `jj git colocation disable` commands respectively).
These commands simply implement the instructions found in https://github.com/jj-vcs/jj/blob/main/docs/git-compatibility.md#converting-a-repo-into-a-co-located-repo

You can also call `jj git colocation status` to show the current colocation status and `jj colocation` to show a help message (with the list of sub-commands).
2025-10-22 06:39:23 +00:00