logoalt Hacker News

stousettoday at 3:27 AM0 repliesview on HN

Of all the things I was imagining it might be, this was down at the bottom.

Personally I’m a huge fan of this approach. If you aren’t, it’s literally just a one-liner (that is trivially made into an alias) to advance a branch name to the most recent revision. And now there’s a feature to do auto-advancing if you want it.

Why is it this way? Because jj is designed around revisions being constantly mutated.

In git, when I make a commit, I am typically signaling that that a chunk of work is complete. Not always, but usually. In most jj workflows, revisions are mutated constantly during development. A revision being made on the tip of a branch is rarely a signal that that unit of work is finished. It’s even incredibly common to have multiple revisions in a row that are works in progress. Hell, the article we’re all commenting on discusses just such a workflow. If I make five revisions on top of some branch, there is no reason to assume that any of them are ready to be shared, much less all of them.

Because of that difference, it makes sense to have an explicit act to move a branch name forward.