←back to thread

128 points nvader | 1 comments | | HN request time: 0.217s | source
Show context
rafaelmn ◴[] No.46190591[source]
So how is this different from git worktrees exactly ?
replies(2): >>46190753 #>>46191208 #
rk06 ◴[] No.46190753[source]
there is no difference as jj is only a frontend to git.

author me tions that git cli require multiple steps when there are unstaged changes.

I don't know if git has one liner cli command for it as i myself use gitextn to create worktrees

replies(3): >>46190898 #>>46191762 #>>46201886 #
dubi_steinkek ◴[] No.46190898[source]
> there is no difference as jj is only a frontend to git.

That's not really true in this case, as the worktree feature from jujutsu is not implemented on top of git worktrees.

replies(2): >>46191425 #>>46192334 #
Macha ◴[] No.46191425[source]
This is kind of unfortunate in this case as it breaks some tooling since the extra trees are not collocated with git, like editor inline history/blame or agents that know to look in git history to fix their mistakes
replies(2): >>46191784 #>>46194292 #
gcr ◴[] No.46191784[source]
isn’t it strictly better to use your editor’s JJ support and ask Claude to use jj?

(I personally think jj shouldn’t support collocated repositories, but happy to learn what others see in them…)

replies(2): >>46192400 #>>46194866 #
1. aseipp ◴[] No.46194866[source]
I think the biggest benefits of colocation are, in rough approximation of the order I encounter them:

1) Various read-only editor features, like diff gutters, work as they usually do. Our editor support still just isn't there yet, I'm afraid.

2) Various automation that tends to rely on things like running `git` -- again, often read-only -- still work. That means you don't have to go and do a bunch of bullshit or write a patch your coworker has to review in order to make your ./run-all-tests.sh scripts work locally, or whatever.

3) Sometimes you can do some kind of nice things like run `git fetch $SOME_URL` and then `git checkout FETCH_HEAD` and it works and jj handles it fine. But I find this rare; I sometimes use this to checkout GitHub PRs locally though. This could be replaced 99% for me by having a `jj github` command or something.

The last one is very marginal, admittedly. Claude I haven't had a problem with; it tends to use jj quite easily with a little instruction.