Live data from Hacker News

I see a future in jj

steveklabnik.com

281–290 of 336 posts

Re: I see a future in jj

#281

Earlier quoted context omitted.

Could you spell out slightly more what you mean? I'm not 100% sure what "get" means.

I think they mean what other branch some branch was originally branched off from.

Yes. I could see confusion about the term "parent" but get? IDK what the confusion is there.

Re: I see a future in jj

#282

Earlier quoted context omitted.

You're kind of right about LLM knowledge but the implication is funny. We just cant be expected to learn new things without LLMs...

What a terrible world we're barrelling towards when "LLMs don't know about it" is considered a blocker towards something taking off. Read a blog post, read a man page (which GP says was indeed their solution), or just play with the dang tool, I assure you these things are still possible without the assistance of a predictive text engine helping you!

Should I learn this thing or wait 4 months until the next LLM refresh might have ingested it?

Re: I see a future in jj

#283

Earlier quoted context omitted.

can you directly get the parent branch of a branch in jj? This is one thing that I constantly find myself wishing was in git but inevitably resign myself to knowing "thats just not how git works."

Right, “parent branch” implies a tree structure, but git is a DAG. You might have a specific workflow such that you can actually answer your question, but it won’t generally apply to all repos. Since a branch is really just a label for a specific commit, which may be at the end of a chain of successive parent commits, a branch isn’t really a first class structure, but a derived one. You can get the fork point of a br…

[deleted]

Re: I see a future in jj

#284
post #258

Earlier quoted context omitted.

This sort of flow is very nice in jj, primarily because of the “no index” plus “auto commit” behavior, I’ll regularly go “oh yeah I want to go do that” and I’m about to just go do it and then come back to right where I left off, since my work is already saved.

Yeah, I get the impression jj is good for this, and if I were using raw git then it would be a massive upgrade. Luckily for me stgit already does what I want in this area so I have no strong need to investigate alternatives, but if stgit ever bitrots then jj might be a useful next thing.

StGit maintainer here. I have been a jj user for over a year now. It has proven superior to StGit for all of my workloads. I even use jj when maintaining StGit.

An incomplete list of wins vs StGit includes:

- jj makes managing multiple branches fluid, whereas stg has limited tools for managing patches between stacks. 'stg pick' is largely all there is. It's a real dance to move a patch between stacks.

- jj has a much better system for naming changes. I'm super jealous of how jj solved this problem. StGit requires you to name the patches. I added the feature that allows StGit to refer to patches by relative or absolute index in addition to by name. jj's immutable change ids that can be referenced by unambiguous prefix is the correct answer to this problem.

- 'jj rebase' is so vastly superior to stg push/pop/sink/float for reordering changes that I don't even know where to start. It wasn't immediately obvious to me just how flexible, simple, and powerful 'jj rebase' is when I first started using jj, I have learned that it is in its own league relative to StGit's stack ordering story.

- Similarly 'jj squash' makes 'stg squash' look amateurish.

I could go on. If you're a StGit user, you owe it to yourself to give jj a proper try.

Re: I see a future in jj

#285

Earlier quoted context omitted.

If you understand why having a great UX on top of bare git is valuable, you have understood 95% of what's to understand about jj.

But there are dozens of great UXs on top of Git already, so if that's 95% of what jj is about then you seem to be making an argument for jj adding very little value. My understanding is that jj offers more than just UX enhancements.

Interesting, isn't it? There you are, and yet none of those dozens are garnering anywhere near the same amount of attention and enthusiasm as jj. And yet, it's genuinely mostly just that -- a novel CLI on top of the same storage backend as git. Sometimes it doesn't take that much to bring about a paradigm shift, I suppose. Just a few new ideas with a great implementation, and there you are -- they've just got to be the right new ideas. That being the hard part.

Re: I see a future in jj

#286

Earlier quoted context omitted.

If you have a database of atoms and plans, the V is a row in a plan table, and you reconstruct history using plan edit distance, which is more robust than manually assigned provenance anyhow (it will retain some history for cherry picked changes, for instance). I'm sure there would be new issues, but I think they'd be at the management/ops level rather than the individual dev level, which is a win since you can conce…

if I make a plan which causes the project to be identical to its state 5 years ago, the edit distance is zero, but in no way can you call that a measure of history

You're still thinking in graphs. That plan would already exist in the database, you would just be making it a build target instead of whatever new plan was targeted before.

Re: I see a future in jj

#287
post #258

Earlier quoted context omitted.

Yeah, I get the impression jj is good for this, and if I were using raw git then it would be a massive upgrade. Luckily for me stgit already does what I want in this area so I have no strong need to investigate alternatives, but if stgit ever bitrots then jj might be a useful next thing.

StGit maintainer here. I have been a jj user for over a year now. It has proven superior to StGit for all of my workloads. I even use jj when maintaining StGit. An incomplete list of wins vs StGit includes: - jj makes managing multiple branches fluid, whereas stg has limited tools for managing patches between stacks. 'stg pick' is largely all there is. It's a real dance to move a patch between stacks. - jj has a much…

On that first point, there's a use case I sometimes have where stgit feels very clunky:

* I have a branch foo with a stack of patches which are the thing I'm working on, based on a master branch

* I have a separate stack of patches on a branch bar (let's say this is a feature that interacts with foo but it's not ready to upstream yet or maybe at all)

* I want to test and work on the combination of foo and bar and make changes that might need to be updates to some patch in foo, or to some patch in bar

At the moment I pick all the patches in foo onto bar in order to do the work and updates in this combined branch, squashing fixes and changes into appropriate patches. Then once I'm happy I go back to the foo branch, blow away the old patches and re-pick them off my combined branch.

This works but feels super clunky -- does jj do better here? That would be a real incentive to try it out.

For the rest, they don't sound like they're strong enough to beat "I've used stgit for 10 years and have a solid workflow with it".

And I just scanned the jj rebase docs and it looks awful, everything I moved to stgit to get away from. I do not want to think about managing a patch stack in terms of "move a bunch of revisions to a different parent". I like having a straightforward stack of patches that I can push, pop and reorder and list. Don't make me think about graphs of commits and multiple rebase suboptions and all that for something that I do all the time in my main workflow, please.

Re: I see a future in jj

#288
post #170

That's exciting! Have you guys looked into sappling from Meta as well? It looked really cool the last time I looked into it but never tried to use it much.

One of ERSC's cofounders left Meta for this, so it's known by the team very well. Sapling and jj are similar for sure.

Re: I see a future in jj

#289

Earlier quoted context omitted.

> Plus I rebase a lot Exactly, me too. Things like `absorb` I'll take, but I don't want jj's opinionated approach to version control. And not only do I not want it for _me_, but I also don't want it for newbies because hiding too much of the underlying design, design issues, etc., seems counterproductive to me.

I’m curious to hear more about what you find opinionated, I think one struggle I’ve had teaching jj to people is that it’s extremely flexible.

I'll have to look again. Last I looked at it I felt like jj was a straightjacket.
Post reply on HN