move: record both source and destination as predecessors

This matches what we do for `jj squash`, whether it's a
full or partial move.

I didn't add a test since we're planning to deprecate `jj move`, and
this will soon be tested via the `jj squash` tests.
This commit is contained in:
Martin von Zweigbergk 2024-03-10 17:19:01 -07:00 committed by Martin von Zweigbergk
parent 018a871ce9
commit e1997f6c9a

View file

@ -220,6 +220,7 @@ from the source will be moved into the destination.
tx.mut_repo()
.rewrite_commit(settings, &destination)
.set_tree_id(new_destination_tree.id().clone())
.set_predecessors(vec![destination.id().clone(), source.id().clone()])
.set_description(description)
.write()?;
Ok(())