Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Pulling the Rug Out Under Oneself

Here’s the situation:

jj edit vz
@    vz          empty
├─╮
│ ○  o          Play instructions
│ ○  kx         Play manual
○ │  zx         Click alternates Xs and Os main
○ │  v          Click sets a X
○ │  s          Square has state
├─╯
~

You want to abandon the merge Change vz, which coincidentally, is also the Current Change:

jj abandon -r vz
@    x          empty
├─╮
│ ○  o          Play instructions
│ ○  kx         Play manual
○ │  zx         Click alternates Xs and Os main
○ │  v          Click sets a X
○ │  s          Square has state
├─╯
○  qq       Fix
○  n        Square is interactive
│
~

Uh! That was unexpected! The merge is still there, with a different Change ID. Why?

This is what Jujutsu thinks:

  • User asked to abandon vz. At once! Deleted!
  • Uhm. That Change was the Current Change and I cannot leave the user without one. I need to create a new Change!
  • Where? Best idea is to create one in the same position, so same parents.

And so another merge Change is generated.

This is a general rule: abandon your Current Change, a new one will be immediately created.