mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-12 23:23:20 +00:00
3b702250a6
We want to move UI-independent logic that's currently in `jj-cli` into `jj-lib`. `WorkspaceCommandHelper` is perhaps the most important part to start moving. As I was looking into what to move from `WorkspaceCommandHelper`, the first thing I saw there was the `cwd`. It might seem like a good candidate to start moving. However, when running a server, you might be running operations on repos stored in database, so `cwd` and the workspace root don't make sense then (because the repo is not stored at a particular path). So, instead, this patch starts abstracting out our uses of those two paths by adding an enum for converting between `RepoPath` and paths as they are presented in the UI. I added a variant for repos stored in a file system, and made `WorkspaceCommandHelper` use that to show that it works. We'll probably add a server variant later. I put the new type in `repo_path.rs` because at least the file-system-based implementation is closely related to `RepoPath::parse_fs_path()`. |
||
---|---|---|
.. | ||
benches | ||
gen-protos | ||
proc-macros | ||
src | ||
tests | ||
testutils | ||
Cargo.toml | ||
LICENSE |