From cb86efac617b109d1e7805c2cf29bb121226ade3 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Sun, 12 Mar 2023 22:31:40 -0700 Subject: [PATCH] demos: clarify command for finding operation to undo The command grepped for 'o ' and picked the third line. That was meant to match the graph nodes only, but it also matched the 'jj co master' line. Let's match only 'o' at the beginning of the line, and throw in another space for good measure (since that's what we get from the new default graph style from Sapling). --- demos/demo_operation_log.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/demo_operation_log.sh b/demos/demo_operation_log.sh index 6639e6060..2c33c25a4 100755 --- a/demos/demo_operation_log.sh +++ b/demos/demo_operation_log.sh @@ -30,7 +30,7 @@ is:" run_command "jj op log --color=always | head" comment "Let's undo that rebase operation:" -rebase_op=$(jj --color=never op log | grep 'o ' | sed '3q;d' | cut -b4-15) +rebase_op=$(jj --color=never op log | grep '^o ' | sed '2q;d' | cut -b4-15) run_command "jj undo $rebase_op" comment "Note that only the rebase was undone, and the