mirror of
https://github.com/martinvonz/jj.git
synced 2024-12-27 06:27:43 +00:00
8a440d8042
@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. |
||
---|---|---|
.. | ||
test_bad_locking.rs | ||
test_commit_builder.rs | ||
test_commit_concurrent.rs | ||
test_conflicts.rs | ||
test_diff_summary.rs | ||
test_git.rs | ||
test_index.rs | ||
test_init.rs | ||
test_load_repo.rs | ||
test_merge_trees.rs | ||
test_mut_repo.rs | ||
test_operations.rs | ||
test_refs.rs | ||
test_revset.rs | ||
test_revset_graph_iterator.rs | ||
test_rewrite.rs | ||
test_view.rs | ||
test_working_copy.rs | ||
test_working_copy_concurrent.rs | ||
test_working_copy_sparse.rs | ||
test_workspace.rs |