Skip to content
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 18 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ gitbutler-workspace = { path = "crates/gitbutler-workspace" }

bstr = "1.12.1"
# Add the `tracing` or `tracing-detail` features to see more of gitoxide in the logs. Useful to see which programs it invokes.
gix = { version = "0.75.0", git = "https://github.com/GitoxideLabs/gitoxide", branch = "main", default-features = false, features = [] }
gix = { version = "0.75.0", git = "https://github.com/GitoxideLabs/gitoxide", branch = "main", default-features = false, features = [
] }
ts-rs = { version = "11.1.0", features = ["serde-compat", "no-serde-warnings"] }
gix-testtools = "0.16.1"
insta = "1.44.3"
Expand Down Expand Up @@ -111,6 +112,11 @@ bitflags = "2.9.4"
notify = "8.2.0"
snapbox = "0.6.23"
url = "2.5.7"
petgraph = { version = "0.8.3", default-features = false, features = [
"stable_graph",
"std",
] }

schemars = { version = "1.0.4", default-features = false, features = [
"std",
"derive",
Expand All @@ -119,9 +125,17 @@ async-openai = { version = "0.31.1", default-features = false, features = [
"rustls",
"chat-completion",
] }
open = "5.3.3"
regex = { version = "1.11.3", default-features = false, features = ["std", "unicode" ] }
clap = { version = "4.5.53", default-features = false, features = ["derive", "std", "help", "unstable-markdown"]}
open = "5.3.2"
regex = { version = "1.11.3", default-features = false, features = [
"std",
"unicode",
] }
clap = { version = "4.5.51", default-features = false, features = [
"derive",
"std",
"help",
"unstable-markdown",
] }
tracing-forest = { version = "0.3.0" }
sysinfo = { version = "0.37.2", default-features = false }

Expand Down
17 changes: 11 additions & 6 deletions crates/but-claude/src/bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,8 @@ impl Default for Claudes {
pub enum ClaudeCheckResult {
/// Claude Code is available and returned a version
Available { version: String },
/// Claude Code _could_ be found, but failed to execute
ExecutionFailed { stdout: String, stderr: String },
/// Claude Code is not available or failed to execute
NotAvailable,
}
Expand Down Expand Up @@ -1048,12 +1050,15 @@ pub async fn check_claude_available(claude_executable: &str) -> ClaudeCheckResul
}

match command.output().await {
Ok(output) if output.status.success() => match String::from_utf8(output.stdout) {
Ok(version) => ClaudeCheckResult::Available {
version: version.trim().to_string(),
},
Err(_) => ClaudeCheckResult::NotAvailable,
},
Ok(output) if output.status.success() => {
let version = str::from_utf8(&output.stdout).unwrap_or("").trim().into();
ClaudeCheckResult::Available { version }
}
Ok(output) if !output.status.success() => {
let stdout = String::from_utf8(output.stdout).unwrap_or_default();
let stderr = String::from_utf8(output.stderr).unwrap_or_default();
ClaudeCheckResult::ExecutionFailed { stdout, stderr }
}
_ => ClaudeCheckResult::NotAvailable,
}
}
3 changes: 1 addition & 2 deletions crates/but-graph/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ but-core.workspace = true

gix = { workspace = true, features = ["revision"] }
bstr.workspace = true
petgraph = { version = "0.8.3", default-features = false, features = ["stable_graph", "std"] }
petgraph.workspace = true
anyhow.workspace = true
bitflags.workspace = true
tracing.workspace = true
Expand All @@ -30,4 +30,3 @@ gitbutler-reference.workspace = true

gix-testtools.workspace = true
insta = "1.44.3"

5 changes: 4 additions & 1 deletion crates/but-rebase/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,19 @@ but-core.workspace = true
but-gerrit.workspace = true
but-error.workspace = true
but-oxidize.workspace = true
but-graph.workspace = true

gix = { workspace = true, features = ["revision", "merge"]}
gix = { workspace = true, features = ["revision", "merge"] }
anyhow.workspace = true
tracing.workspace = true
bstr.workspace = true
tempfile.workspace = true
serde.workspace = true
toml.workspace = true
petgraph.workspace = true

[dev-dependencies]
but-testsupport.workspace = true
insta = "1.44.3"
but-core = { workspace = true, features = ["testing"] }
but-meta.workspace = true
10 changes: 5 additions & 5 deletions crates/but-rebase/src/cherry_pick.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,13 +321,13 @@ pub(crate) mod function {
#[derive(Default, Debug, Clone, Serialize, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct ConflictEntries {
ancestor_entries: Vec<PathBuf>,
our_entries: Vec<PathBuf>,
their_entries: Vec<PathBuf>,
pub(crate) ancestor_entries: Vec<PathBuf>,
pub(crate) our_entries: Vec<PathBuf>,
pub(crate) their_entries: Vec<PathBuf>,
}

impl ConflictEntries {
fn has_entries(&self) -> bool {
pub(crate) fn has_entries(&self) -> bool {
!self.ancestor_entries.is_empty()
|| !self.our_entries.is_empty()
|| !self.their_entries.is_empty()
Expand All @@ -345,7 +345,7 @@ pub(crate) mod function {
}

/// Return the `conflicted` header field value.
fn conflicted_header_field(&self) -> Option<u64> {
pub(crate) fn conflicted_header_field(&self) -> Option<u64> {
let entries = self.total_entries();
Some(if entries > 0 { entries as u64 } else { 1 })
}
Expand Down
Loading
Loading