Skip to content

Commit

Permalink
chore: windows git unknown behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Ramos committed Oct 25, 2024
1 parent 5424846 commit 59755ae
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions crates/workspace_std/src/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ impl Repository {
}

pub fn add_all(&self) -> GitResult<bool> {
execute_git(&self.location, ["add", "--all"], |_, output| Ok(output.status.success()))
execute_git(&self.location, ["--verbose", "add", "--all"], |_, output| {
Ok(output.status.success())
})
}

pub fn add(&self, path: &Path) -> GitResult<bool> {
Expand Down Expand Up @@ -564,13 +566,9 @@ where
{
let root = adjust_canonicalization(path);
let root = PathBuf::from(root);
let output = Command::new("git")
.current_dir(root.as_path())
.args(args)
.spawn()
.expect("Failed to execute git command");
let output = Command::new("git").current_dir(root.as_path()).args(args).output();

output.wait_with_output().map_err(|_| GitError::Execution).and_then(|output| {
output.map_err(|_| GitError::Execution).and_then(|output| {
if output.status.success() {
if let Ok(message) = str::from_utf8(&output.stdout) {
process(strip_trailing_newline(&message.to_string()).as_str(), &output)
Expand Down

0 comments on commit 59755ae

Please sign in to comment.