Yeah, I love jj, but I'm not a fan of that naming. It threw me for a loop for the first couple months.
I'm not sure what happens, but I suspect a merge would create a single merge commit with the tips of the parents' histories, and then add new commits from there on.
A split is probably conceptually similar to making two new branches, except each of the new commits gets one of the branch tips. Really just guessing here, I have no idea if that's how it works, or if they share commits or not.
Re:Jujutsu for Busy Devs
by steveklabnik on Tuesday July 22, 2025 @11:38AM
(#44648508)
Yeah so people will be a bit loosey-goosey with the terminology. But all of these changes are immutable, that is, when you change a change, you’re generating a new commit. “A VCS on top of a VCS” isn’t a terrible way of thinking about it: imagine if every commit in your repo had its own history.
Merging is making a change that has more than one parent. You can then resolve any conflicts within that change.
Splitting a change into two will update one commit with one half and make a new change with the other half.
Re:Jujutsu for Busy Devs
by 1718627440 on Tuesday July 22, 2025 @01:01PM
(#44650017)
You can have merge conflicts, when you combine two commits (--amend in git terminology, not sure how it's called in jj)?
Re:Jujutsu for Busy Devs
by steveklabnik on Tuesday July 22, 2025 @02:06PM
(#44650888)
Oh, since you said 'merge' I thought you meant like git merge. Amending a commit works the same way as git. The difference is just that the oplog will have the full history, including before you amended, so you can roll back easily.
Re:Jujutsu for Busy Devs
by 1718627440 on Wednesday July 23, 2025 @04:45AM
(#44657019)
So the history of the second commit gets discarded?
Re:Jujutsu for Busy Devs
by steveklabnik on Wednesday July 23, 2025 @09:10AM
(#44658832)
Ah, I see what you're saying. I think so, the evolog ends up showing that stuff was squashed elsewhere, I believe.
What happens when you merge or split changes with the change history? It sounds a bit like applying a VCS on top of a VCS.