-
Notifications
You must be signed in to change notification settings - Fork 750
git: add git colocate command #7392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
416a7c2
to
32ef2c8
Compare
979a10e
to
0fe12f1
Compare
Is there any impact on existing workspaces or clones? (not sure if there are pointers to .git or defined remotes that would be "not found") |
Sorry, when you say that Also, are you saying that you'd prefer to merge #4833 rather than this version? I'm sorry I had not seen that existing PR. |
I don't think it affects existing workspaces, since they refer to the .jj/repo folder, I believe, which is still there. |
You aren't doing it, as the PR now has three commits, when it only should be one (there should be no, PR suggestions commit and the final rework also only should exist while the approach is discussed). Because the project doesn't squash merge commits and only rebases them.
I'm pretty sure @cormacrelf won't mind if you resubmit that patch for him which would finally land this. |
7a6cffe
to
a95813a
Compare
OK. I actually prefer to do what you suggest but I was worried it could cause issues with GitHub's comment tracking. I've just pushed a new version which squashes the 3 commits into one.
I don't mind which one of the two PRs is merged, but if
OK. Actually I prefer doing what you suggest (since it is so natural when using jj) but I was worried it might cause problems with GitHub's PR comment tracking. I just squashed all 3 changes, updated the commit message to indicate that it fixes #4624 and pushed this new version.
I don't mind which PR is merged as long as one is merged, but if #4833 is preferable I think it'd be best if the original author got it through. |
That PR was never finalized, which is unfortunate, but is something quite common when the contributor switches to something else or doesn't have time to work on it anymore. This PR also adds a way to de-colocate the repository, that the previous one didn't have. I there a specific reason to prefer the previous one? |
It contains the start for colocated workspaces and is overall simpler by not having the |
I had not considered the jj workspace / git worktree integration which I guess would be nice. No reason why it could not be added later. It's true that #4833 is a smaller change than this PR but I guess part of the reason is that it does not support undoing the co-location. Also, even though I initially proposed a similar interface for colocating a repo as what is proposed by #4833, (i.e. a simple Honestly, I'm a little worried that unless someone makes a decision either way, both PRs will get stuck and none of them will land anytime soon. |
In terms of the justification for this, we should consider that colocated repos will likely become the default in the October release. (#7213) So I assume the need for turning a non-colocated repo into a colocated one after the fact will be much smaller. How about the other way around? Will there be lots of people wanting to turn their default-colocated repos into non-colocated ones? I don't know. |
These requests are rare if you look through the Discord and GH discussions, so I'd prefer the simpler interface and defer the |
In that case, do we need this command at all if colocated repos become the default? |
yes, since it is a useful helper in its own, since I assume there will be a bunch of people who'll want to try out the 'native' experience and switch back. |
(Non-blocking) Suggestion from @algmyr on IRC:
|
1acb266
to
69862a1
Compare
@AngelEzquerra: It looks like this is pretty close to ready to merge. Do you think you will find time to finish it? No rush, though. I'm mostly just checking that you haven't forgotten about it. |
af2bf2e
to
c4a6719
Compare
OK, I believe I have fixed all the nits raised by @yuja. I think it can be merged now! @yuja, can you do a final review and let me know if I can merge? Thanks! |
0ebedee
to
a36c9f5
Compare
a36c9f5
to
2e87f17
Compare
2e87f17
to
4acf66f
Compare
ca40434
to
e8ea767
Compare
…vcs#4624) 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).
e8ea767
to
c5235c4
Compare
This new command lets you turn a non colocated git repo into a colocated repo or vice-versa (by using the
jj git colocate enable
andjj git colocate 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
If you just call
jj git colocate
(without a sub-command) a help message (with the list of sub-commands) is shown.Checklist
If applicable:
CHANGELOG.md
README.md
,docs/
,demos/
)cli/src/config-schema.json
)