You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just commenting why I think the f->e->b edge should be preserved:
disconnected -r targets are rebased as if they were all connected
in order to achieve that, internal edges across skipped nodes are preserved
so it seems better to apply the same rule to external edges
In practice, I wouldn't try this kind of weird rebase, and I wouldn't mind if f->e->b was removed. My point is that it's easier to reason about the behavior if we have a consistent model (such as rebase -r c|f is equivalent to rebase --keep -r c::f + abandon c|f + abandon e'.)
create_commit(&test_env, &repo_path, "a", &[]);
create_commit(&test_env, &repo_path, "b", &["a"]);
create_commit(&test_env, &repo_path, "c", &["a"]);
create_commit(&test_env, &repo_path, "d", &["a"]);
create_commit(&test_env, &repo_path, "e", &["c", "b"]);
create_commit(&test_env, &repo_path, "f", &["e"]);
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
@ f
◉ e
├─╮
│ ◉ b
◉ │ c
├─╯
│ ◉ d
├─╯
◉ a
◉
"###);
// TODO: edge f->e->b is lost
test_env.jj_cmd_ok(&repo_path, &["rebase", "-r", "c|f", "-d", "d"]);
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
@ f
◉ c
◉ d
│ ◉ e
╭─┤
│ ◉ b
├─╯
◉ a
◉
"###);
Just commenting why I think the
f->e->b
edge should be preserved:-r
targets are rebased as if they were all connectedIn practice, I wouldn't try this kind of weird rebase, and I wouldn't mind if
f->e->b
was removed. My point is that it's easier to reason about the behavior if we have a consistent model (such asrebase -r c|f
is equivalent torebase --keep -r c::f
+abandon c|f
+abandon e'
.)Originally posted by @yuja in #3605 (comment)
The text was updated successfully, but these errors were encountered: