jj/lib/tests
Martin von Zweigbergk 8a440d8042 git: on export, use repo view's git_refs as record of old export state
@yuja asked on #701 about the difference between the state in the
`git_export_view` and what we have in `mut_repo.view()`. It's true
that the branches in `mut_repo.view().git_refs()` should match what we
wrote to disk. We can therefore remove the on-disk storage and
simplify quite a bit. For now, I create the `last_export_view` from
the `mut_repo.view().git_refs()` before calling
`export_changes()`. I'll clean up a bit more next.

I think this is correct even considering e.g. undo. Let's consider
what would happen in a non-colocated Git repo (not because tricky
cases cannot happen there but because the explicit exports and imports
make it easier to discuss, and more cases can occur). If the user
moved a branch and then did `jj git export`, `jj undo`, and then `jj
git export` again, we would think on the second export that we should
perform the same changes to the Git repo, which should have no effect.

This patch also fixes the bug we were forced to work around in the
test case in the previous patch.

This removes one of our uses of Thrift.
2022-12-03 09:32:49 -08:00
..
test_bad_locking.rs copyright: change from "Google LLC" to "The Jujutsu Authors" 2022-11-28 06:05:45 -10:00
test_commit_builder.rs copyright: change from "Google LLC" to "The Jujutsu Authors" 2022-11-28 06:05:45 -10:00
test_commit_concurrent.rs copyright: change from "Google LLC" to "The Jujutsu Authors" 2022-11-28 06:05:45 -10:00
test_conflicts.rs copyright: change from "Google LLC" to "The Jujutsu Authors" 2022-11-28 06:05:45 -10:00
test_diff_summary.rs copyright: change from "Google LLC" to "The Jujutsu Authors" 2022-11-28 06:05:45 -10:00
test_git.rs git: on export, use repo view's git_refs as record of old export state 2022-12-03 09:32:49 -08:00
test_index.rs copyright: change from "Google LLC" to "The Jujutsu Authors" 2022-11-28 06:05:45 -10:00
test_init.rs copyright: change from "Google LLC" to "The Jujutsu Authors" 2022-11-28 06:05:45 -10:00
test_load_repo.rs copyright: change from "Google LLC" to "The Jujutsu Authors" 2022-11-28 06:05:45 -10:00
test_merge_trees.rs copyright: change from "Google LLC" to "The Jujutsu Authors" 2022-11-28 06:05:45 -10:00
test_mut_repo.rs copyright: change from "Google LLC" to "The Jujutsu Authors" 2022-11-28 06:05:45 -10:00
test_operations.rs copyright: change from "Google LLC" to "The Jujutsu Authors" 2022-11-28 06:05:45 -10:00
test_refs.rs copyright: change from "Google LLC" to "The Jujutsu Authors" 2022-11-28 06:05:45 -10:00
test_revset.rs revset: add unary negate (or set complement) operator '~y' 2022-11-29 15:46:15 +09:00
test_revset_graph_iterator.rs copyright: change from "Google LLC" to "The Jujutsu Authors" 2022-11-28 06:05:45 -10:00
test_rewrite.rs copyright: change from "Google LLC" to "The Jujutsu Authors" 2022-11-28 06:05:45 -10:00
test_view.rs view: test that merging divergent rewrites results in both commits visible 2022-12-01 19:20:38 -08:00
test_working_copy.rs git: do not delete or track git submodules. 2022-12-01 23:14:55 +05:30
test_working_copy_concurrent.rs copyright: change from "Google LLC" to "The Jujutsu Authors" 2022-11-28 06:05:45 -10:00
test_working_copy_sparse.rs copyright: change from "Google LLC" to "The Jujutsu Authors" 2022-11-28 06:05:45 -10:00
test_workspace.rs copyright: change from "Google LLC" to "The Jujutsu Authors" 2022-11-28 06:05:45 -10:00