Skip to content

Commit

Permalink
Use git command to fetch repositories instead of libgit2 for robu…
Browse files Browse the repository at this point in the history
…st SSH support
  • Loading branch information
zanieb committed Feb 20, 2024
1 parent 17b1f1a commit 313c720
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion crates/uv-git/src/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,11 @@ fn fetch_with_cli(
.env_remove("GIT_OBJECT_DIRECTORY")
.env_remove("GIT_ALTERNATE_OBJECT_DIRECTORIES")
.cwd(repo.path());
cmd.exec()?;

// TODO(zanieb): Can we report the captured output to the user for debugging?
// We capture the output to avoid streaming it to the user's console during clones
// The required `on...line` callbacks currently do nothing.
cmd.exec_with_streaming(&mut |_| Ok(()), &mut |_| Ok(()), true)?;
Ok(())
}

Expand Down
2 changes: 1 addition & 1 deletion crates/uv-git/src/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl GitSource {
Self {
git,
client: Client::new(),
strategy: FetchStrategy::Libgit2,
strategy: FetchStrategy::Cli,
cache: cache.into(),
reporter: None,
}
Expand Down

0 comments on commit 313c720

Please sign in to comment.