Most active commenters

    ←back to thread

    128 points nvader | 12 comments | | HN request time: 0.205s | source | bottom
    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 #
    1. 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 #
    2. 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 #
    3. 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 #
    4. rk06 ◴[] No.46192334[source]
    wtf? it can diverge from git?

    wasn't git compatibility it's main pro?

    replies(5): >>46193172 #>>46194310 #>>46194774 #>>46198872 #>>46201894 #
    5. Macha ◴[] No.46192400{3}[source]
    jj support in editors is way behind git support.
    6. SatvikBeri ◴[] No.46193172[source]
    You can still use git worktrees in a colocated repository. jj workspaces are a different, but similar capability that provide some extra features, at the cost of some others.
    7. steveklabnik ◴[] No.46194292[source]
    The fix for having worktrees be colocated is in progress. Not sure when it’ll be done but it’s coming.
    8. steveklabnik ◴[] No.46194310[source]
    Yes, jj is its own VCS with pluggable backends.

    Google uses it with Piper, their centralized VCS.

    Being compatible and being purely a frontend aren’t the same thing.

    9. aseipp ◴[] No.46194774[source]
    To be technical, it's more that it can read and write the on-disk Git format directly, like many other tools can.

    I think the easiest way to conceptualize it is to think of Git and jj as being broken down into three broad "layers": data storage, algorithms, user interface. Jujutsu uses the same data storage format as Git -- but each of them have their own algorithms and user interface built atop that storage.

    10. aseipp ◴[] No.46194866{3}[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.

    11. xboxnolifes ◴[] No.46198872[source]
    git is the storage layer. JJ's commands do not have to, and never did, match git one-to-one.
    12. antonvs ◴[] No.46201894[source]
    No, that's just a practical approach to supporting migration to jj.

    If we want to improve systems, we need to be able to migrate conveniently from older systems to better ones.