4 ms·
Yep. Same thing in Jujutsu (the recursive merge is at https://github.com/martinvonz/jj/blob/a6ef792ba66b5b19e752827a89a3366d57500c34/lib/src/rewrite.rs#L31 htt
by martinvonz 5y ago
Yep. Same thing in Jujutsu (the recursive merge is at
https://github.com/martinvonz/jj/blob/a6ef792ba66b5b19e752827a89a3366d57500c34/lib/src/rewrite.rs#L31 https://github.com/martinvonz/jj/blob/a6ef792ba66b5b19e75282...). Probably the biggest difference compared Git there is that it'll still work even if there are conflicts.
FYI, this is also how `jj undo` works, except that it's a three-way merge at the repo level (https://github.com/martinvonz/jj/blob/d9b364442e2246a734d600b2a4e6475dcd48319b/src/commands.rs#L3894 https://github.com/martinvonz/jj/blob/d9b364442e2246a734d600...). So that applies changes to branches, checkouts (think: git HEAD), and sets of anonymous heads. This is how you can undo an operation even if it wasn't the most recent one (just like you can `git revert` a commit that wasn't the most recent one).