Rename 'project_core' crate to 'worktree', make it just about worktrees (#9189)

This is just a refactor. I noticed that we now have a `project_core`
crate, which mainly contains the `Worktree` type and its private
helpers, plus the project's settings.

In this PR, I've renamed that crate to `worktree` and did some minor
simplification to its module structure. I also extracted a new
`WorktreeSettings` settings type from the `ProjectSettings`, so that the
worktree settings could live in the worktree crate. This way, the crate
is now exclusively about worktree logic.

Release Notes:

- N/A
This commit is contained in:
Max Brunsfeld 2024-03-11 11:35:27 -07:00 committed by GitHub
parent 2b67bb27cf
commit dfcc143ead
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 215 additions and 190 deletions

View file

@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/extension_store.rs"
doctest = false
[[bin]]
name = "extension_json_schemas"

View file

@ -260,13 +260,6 @@ impl ExtensionBuilder {
.args(["fetch", "--depth", "1", "origin", &rev])
.output()
.context("failed to execute `git fetch`")?;
if !fetch_output.status.success() {
bail!(
"failed to fetch revision {} in directory '{}'",
rev,
directory.display()
);
}
let checkout_output = Command::new("git")
.arg("--git-dir")
@ -276,6 +269,13 @@ impl ExtensionBuilder {
.output()
.context("failed to execute `git checkout`")?;
if !checkout_output.status.success() {
if !fetch_output.status.success() {
bail!(
"failed to fetch revision {} in directory '{}'",
rev,
directory.display()
);
}
bail!(
"failed to checkout revision {} in directory '{}'",
rev,