From 5345eb26f36c288cce40703ff0d678ce209100e0 Mon Sep 17 00:00:00 2001 From: Kyle J Strand Date: Thu, 13 Jun 2024 18:46:30 -0600 Subject: [PATCH] make 'split' advance branches to first commit --- cli/src/commands/split.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cli/src/commands/split.rs b/cli/src/commands/split.rs index f0d2b279328..384193de746 100644 --- a/cli/src/commands/split.rs +++ b/cli/src/commands/split.rs @@ -75,6 +75,7 @@ pub(crate) fn cmd_split( "Use `jj new` if you want to create another empty commit.", )); } + let advanceable_branches = workspace_command.get_advanceable_branches(commit.parent_ids())?; workspace_command.check_rewritable([commit.id()])?; let matcher = workspace_command @@ -202,6 +203,9 @@ the operation will be aborted. }, )?; + // Does nothing if there's no branches to advance. + tx.advance_branches(advanceable_branches, &first_commit.id()); + if let Some(mut formatter) = ui.status_formatter() { if num_rebased > 0 { writeln!(formatter, "Rebased {num_rebased} descendant commits")?;