News for hackers. Stuff that matters.
Re:Jujutsu for Everyone by BeetleB on Sunday August 31, 2025 @03:24PM (#45086227)
Here's a typical scenario.

You do a git pull, just so your branch isn't so out of sync. Immediately you get merge conflicts. You then tell jj "Hey, I'll deal with this later", and make a branch off of the last commit that was conflict free and continue your work there. jj stores the conflict as is, but your branch is conflict free.

When you feel you have the energy to deal with the conflict, you switch to the branch that has the conflict, and fix the issue(s). Then you can manipulate the graph (rebase, whatever) so you can have everything in one branch - your changes and the changes you pulled in.

Re:Jujutsu for Everyone by 1718627440 on Sunday August 31, 2025 @04:15PM (#45086667)
So you essentially do a fast-forward until the first commit with a merge commit and then take the previous one?

Sounds like something that could also become a flag for git merge.

Re:Jujutsu for Everyone by steveklabnik on Sunday August 31, 2025 @07:21PM (#45087968)
Git won’t let the portion of the branch that’s still conflicted remain in conflict while you go and work on the other part.
Re:Jujutsu for Everyone by 1718627440 on Monday September 01, 2025 @03:44AM (#45090471)
I would just abort the conflict resolution.
Re:Jujutsu for Everyone by steveklabnik on Monday September 01, 2025 @05:14PM (#45096669)
Then you’re back to the state before the rebase. Which is fine, the point is just that they’re not equivalent!
Re:Jujutsu for Everyone by 1718627440 on Tuesday September 02, 2025 @01:23PM (#45106167)
Yes. What's the equivalent would be to just keep the successfully rebased part. Right now you need to do keep the ref yourself.

> Sounds like something that could also become a flag for git merge.

Re:Jujutsu for Everyone by riwsky on Sunday August 31, 2025 @09:57PM (#45088746)
No. The GP making a commit off of the first non-conflict isn’t the essence of the feature he’s talking about, just an example of what he can do next.

He’d also be free to edit upstream to not commit, or split a change in two so that parts unrelated to the conflict are in their own change. The big idea is that he doesn’t need to blindly decide that before seeing what the conflict is.

Re:Jujutsu for Everyone by EMM_386 on Sunday August 31, 2025 @05:02PM (#45087058)
> When you feel you have the energy to deal with the conflict

So you just kick the can down the road and end up with possibly an even more difficult conflict resolution?

Re:Jujutsu for Everyone by BeetleB on Sunday August 31, 2025 @06:25PM (#45087653)
> So you just kick the can down the road and end up with possibly an even more difficult conflict resolution?

That sentiment is true for pretty much anything in life one may decide to defer till later :-)

More concretely, it's often not hard to tell if deferring it will make it worse, or merely the same.

The whole point of version control is to give your mind some peace in not worrying about things ("Let's make this change and we can always revert if it doesn't work out"). Conflicts are no different. There's no fundamental reason a conflict needs to be treated like an emergency.

Re:Jujutsu for Everyone by sunshowers on Sunday August 31, 2025 @09:25PM (#45088598)
Or none at all, if you decide to abandon that work (as has happened to me a bunch).
Re:Jujutsu for Everyone by MangoToupe on Monday September 01, 2025 @07:27AM (#45091805)
Isn't this equivalent to simply hard resetting to before the pull? (Or the commit before the conflict?) Plus then you don't end up with an extraneous branch.