Commit Graph

10 Commits

Author SHA1 Message Date
Martin von Zweigbergk
8ef00a3498 tests: re-run with insta crate version b9d99e87065b 2022-04-28 16:55:10 -07:00
Martin von Zweigbergk
9f9af78c45 cli: provide better error message for no-arg jj move 2022-04-25 17:29:48 -07:00
Martin von Zweigbergk
04f11c0dc3 rebase: update bookkeeping for branches as we rebase descendants
The `DescendantRebaser` keeps a map of branches from the source
commit, so it gets efficient lookup of branches to update when a
commit has been rebased. This map was not kept up to date as we
rebased. That could lead to branches getting left on hidden
intermediate commits. Specifically, if a commit with a branch was
rewritten by some command, and an ancestor of it was also rewritten,
then we'd only update the branch only the first step and not update it
again when rebasing onto the rewritten ancestor.
2022-04-25 14:05:27 -07:00
Martin von Zweigbergk
cc7e20859c tests: add tests of jj move to ancestor, showing lost branch
I noticed earlier today that branches get lost (stuck on a hidden
commit) when you move part of a change to an ancestor. This patch adds
tests for both of those cases, showing the bug. There's no special
logic for this case in the CLI crate, so we should be able to test it
in the library crate instead, but since I have already written the
tests, maybe we can keep them.
2022-04-25 14:05:27 -07:00
Martin von Zweigbergk
9d440ca835 tests: remove a duplicate log output in jj move test 2022-04-25 14:05:27 -07:00
Martin von Zweigbergk
cf7bef88fe tests: extract a function for getting log output in jj move test 2022-04-25 14:05:27 -07:00
Martin von Zweigbergk
082ec5ae3b cli: teach jj move to move only changes to specified paths
I quite often want to move the changes to a particular file from one
commit to another. We already support that using `jj move -i`, but
that can be annoying to run because we don't have a TUI for it
(#48). Let's make it possible to do `jj move --from X --to Y <path>`.
2022-04-09 16:13:01 -07:00
Martin von Zweigbergk
bc3c2db828 cli: print errors to stderr 2022-04-09 16:13:01 -07:00
Martin von Zweigbergk
3d8d0bea71 tests: add tests for jj move -i 2022-04-06 23:31:28 -07:00
Martin von Zweigbergk
dc41c4bfe4 tests: add tests of jj move 2022-04-06 23:31:28 -07:00