diff --git a/cli/src/commands/rebase.rs b/cli/src/commands/rebase.rs index 58bd394a22e..052c12f70b4 100644 --- a/cli/src/commands/rebase.rs +++ b/cli/src/commands/rebase.rs @@ -369,14 +369,18 @@ fn rebase_revision( let num_rebased_descendants = rebased_commit_ids.len(); // We now update `new_parents` to account for the rebase of all of - // `old_commit`'s descendants. Even if some of the original `new_parents` were - // descendants of `old_commit`, this will no longer be the case after the - // update. + // `old_commit`'s descendants. Even if some of the original `new_parents` + // were descendants of `old_commit`, this will no longer be the case after + // the update. // // To make the update simpler, we assume that each commit was rewritten only // once; we don't have a situation where both `(A,B)` and `(B,C)` are in - // `rebased_commit_ids`. This assumption relies on the fact that a descendant of - // a child of `old_commit` cannot also be a direct child of `old_commit`. + // `rebased_commit_ids`. + // TODO(ilyagr): This assumption relies on the fact that, after + // `rebase_descendants`, a child of `old_commit` cannot also be a direct + // child of `old_commit`. This will likely change, see + // https://github.com/martinvonz/jj/issues/2600. So, the code needs to be + // updated before that happens. let new_parents: Vec<_> = new_parents .iter() .map(|new_parent| {