Live data from Hacker News

Jujutsu and Radicle

radicle.xyz

51–60 of 97 posts

Re: Jujutsu and Radicle

#51
post #48
post #47

Earlier quoted context omitted.

> The TUI that jj uses for interactive changes, `scm-record`, is fine but not great. The change selection TUI is one of the things that I'm happiest with in jj over the equivalent in git. It's a huge quality of life improvement over git's version. Could it be even better? Probably... but compared to `git add -p`... it is already way better.

Right, but the only time I've ever used `git add -p` was just to try it out years ago and be like "yep that sucks" and go back to using Magit (and then later VS Code). Those are my actual baselines.

Totally fair, I stubbornly used `git add -p` anyways because the terminal is where I want that tool to live, but I entirely understand why other people have different habits here.

Re: Jujutsu and Radicle

#52
post #27

Earlier quoted context omitted.

I really hope they don't add submodule support. There's an opportunity to do something that works properly!

I feel like submodules are one of Git's most misused features. They're intended as a method of pinning read-only upstream Git dependencies. And when used for that purpose, they're good at what they do. I think that people mostly get a bad taste in their mouths because they try to use submodules for building multi-repo workspaces where a developer might need to commit in some/all of the repos. They're a bad fit for th…

> They're intended as a method of pinning read-only upstream Git dependencies. And when used for that purpose, they're good at what they do.

No they are not. In theory they could be good, but the actual implementation falls down in ... let me count the ways:

1. Transitive dependencies. I sure do love that my company's submodule-based repo has 12 copies of one of our dependencies.

2. Checkouts don't work any more. You can't simply `git switch `, especially if that other branch has a different set of submodules. And good fucking luck if one branch has a submodule and another branch has a not-submodule in the same location.

3. They don't work with worktrees. In theory... maybe. In practice, the documentation says not to try and in my experience it is right!

4. The submodule URLs are now baked into the git repo. This means you can't mirror the repo anymore easily. I've even had cases where I couldn't even clone the repo because the authors had used `ssh://` URLs which required permissions I didn't have. It's insane that the authentication method gets baked into the repo. I have no idea why they implemented it like this.

5. The tooling experience is just way worse. Want to see a diff of everything you've changed? Well you can't. If you've changed anything in a submodule you just get a hash difference, or at best a list of commits (which is better but it's not even the default!).

Before you instinctively reach for the "well obviously it must work like that" part of your brain, take a moment to think if it should work like this. I can think of several ways to do it better (beyond just making the implementation less buggy).

Re: Jujutsu and Radicle

#53
post #50

I used jj for a while and it was so problematic and seemed like nothing added value as compared to git. And now in the world of LLMs it is more difficult to switch to jj.

I actually think jujutsu is _more_ ideal for the agentic era. It makes it so easy to explore directions, experiment, play, backtrack, move commits around, etc.

Re: Jujutsu and Radicle

#54
post #46

I think this is the first blog on JJ that has made me want to use it. The flow seems like it could be quite a bit better than git

Ok, so I have to admit I started skimming soon, because after explanation of `jj new`, I thought this is just `git commit --allow-empty`. Oh, and you can specify the message! Add `-m` and you are done. Then it's a series of either git ammends or `git checkout -b` etc. Now, since there is so much high praise in this comment and sibling comments, what am I really missing? From the post it just seems like the person hat…

Here's a few workflows that I really enjoy in jj:

- While I'm working on something I can do `jj desc` and start writing the commit message. Every edit is automatically being added to this change.

- My work tree is dirty and I quickly want to switch to a clean slate. In Git: (1) either do `git stash` where I'm definitely is going to forget about it or (2) do `git commit -a -m wip && git switch -c some-random-branch-name`. In jj: `jj new @-`. That's it! If I run `jj log` then my previous change shows up. No need to come up with arbitrary names. It's so refreshing to move changes around.

- I'm working on a stack of changes and sometimes need to make edits to different parts. In Git (1): Each change is its own branch and I need to switch around and do a bunch of rebases to keep them in sync. In Git (2): I have one branch with multiple commits. I make changes towards the final state and then do `git rebase -i` to move them upwards to where they belong. Biggest downside: I'm not actually testing the changes at the point where they end up and I'm not guaranteed it makes sense. In jj: I do `jj new ` to make changes further up in the stack. Once I'm happy with it I do `jj squash` and every dependent change is automatically rebased on top.

- And finally: I can solve merge conflicts when I want to! If any rebasing leads to a merge conflict I don't have to deal with it right away.

Re: Jujutsu and Radicle

#56
post #46

I think this is the first blog on JJ that has made me want to use it. The flow seems like it could be quite a bit better than git

Ok, so I have to admit I started skimming soon, because after explanation of `jj new`, I thought this is just `git commit --allow-empty`. Oh, and you can specify the message! Add `-m` and you are done. Then it's a series of either git ammends or `git checkout -b` etc. Now, since there is so much high praise in this comment and sibling comments, what am I really missing? From the post it just seems like the person hat…

If you already have 15 years of muscle memory for efficient use of git it's probably not that valuable to you. AFAIU jj's goal is to allow people to be as effective in a workflow like you describe without having to stumble through all of git to find the happy path building that muscle memory.

Re: Jujutsu and Radicle

#58
post #46

I think this is the first blog on JJ that has made me want to use it. The flow seems like it could be quite a bit better than git

Ok, so I have to admit I started skimming soon, because after explanation of `jj new`, I thought this is just `git commit --allow-empty`. Oh, and you can specify the message! Add `-m` and you are done. Then it's a series of either git ammends or `git checkout -b` etc. Now, since there is so much high praise in this comment and sibling comments, what am I really missing? From the post it just seems like the person hat…

That exact workflow? It won't improve much. But it tends to change peoples' workflows.

For example: let's say you have a few feature branches in flight at the same time, and you want to make a change to one of them to address some PR feedback. In your git workflow, that presumably means something like `git stash; git checkout feature-name; vim-and-actually-make-the-change; git add -up; git commit; git push; git checkout whatever-you-were-doing-before; git stash pop`, ± a `--amend` depending on your PR philosophy. A common workflow in jj is to instead sit on top of a merge commit with all the feature branches at once, and handle this like `vim-and-actually-make-the-change; jj squash -i --into feature-name; jj git push`. You can do something like the latter in git too, of course, it just tends to get hairy relatively quickly with rebases and merge conflicts.

Re: Jujutsu and Radicle

#59
post #24

Earlier quoted context omitted.

This was the thing that stopped me from giving jj a shot for the longest time, but it turned out to be a complete non-issue. Definitely don't turn it off! The "aha" moment you might be missing is that you should consider your latest revision to just be the staging area. `jj commit -i` (shorthand for `jj describe; jj split -i`) is effectively `git add -i; git commit`. If you're worried about accidentally pushing unfin…

Say I check out a branch (or bookmark or whatever). I compile it. Some stuff doesn't work. I add some debug printfs. Compile it again. Ok I'm done now. In git I can just revert all the changes and I haven't modified anything important. In `jj` won't I have actually added all of those debug printfs to the top commit of that branch? Now I have to manually revert the edit? As I understand it, the answer is "aha, but you…

In order to "check out a branch" in jj, you would have had to run `jj new` already. So your edits won't be "added ... to the top commit of that branch", but in a new commit (revision) when you checked out the branch. Then you can use `jj split` to keep whatever changes are important and discard the debug print statements.

Re: Jujutsu and Radicle

#60
post #27

Earlier quoted context omitted.

I really hope they don't add submodule support. There's an opportunity to do something that works properly!

I feel like submodules are one of Git's most misused features. They're intended as a method of pinning read-only upstream Git dependencies. And when used for that purpose, they're good at what they do. I think that people mostly get a bad taste in their mouths because they try to use submodules for building multi-repo workspaces where a developer might need to commit in some/all of the repos. They're a bad fit for th…

> They're intended as a method of pinning read-only upstream Git dependencies.

Except, dependencies are rarely read-only.

Post reply on HN