Unified · Split
| @@ -12,13 +12,14 @@ pub(crate) fn repo(name: &str) -> git::Repository { · 11 unmodified lines | ||
| 12 | 12 | git::open_opts(repo_path(name), git::open::Options::isolated()).unwrap() |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | −/// Spawn a git-daemon hosting all directories in or below `base_dir` if we are in async mode - currently only TCP is available in async mode, | |
| 16 | −/// and it's probably going to stay that way as we don't want to chose a particular runtime in lower-level crates which | |
| 17 | −/// provide the blocking implementation for everything. Maybe this changes one day once we implement other protocols | |
| 18 | −/// like spawning a process via `tokio` or `async-std`. | |
| 15 | +/// Spawn a git-daemon hosting all directories in or below `base_dir` if we are in async mode - currently only TCP is | |
| 16 | +/// available in async mode, and it's probably going to stay that way as we don't want to chose a particular runtime | |
| 17 | +/// in lower-level crates just yet. | |
| 18 | +/// Maybe this changes one day once we implement other protocols like spawning a process via `tokio` or `async-std`, or | |
| 19 | +/// provide async HTTP implementations as well. | |
| 19 | 20 | #[cfg(any(feature = "blocking-network-client", feature = "async-network-client-async-std"))] |
| 20 | 21 | #[cfg_attr(not(feature = "async-network-client-async-std"), allow(unused_variables))] |
| 21 | −pub(crate) fn spawn_git_daemon_if_async<'repo, 'a>( | |
| 22 | +pub(crate) fn spawn_git_daemon_if_async( | |
| 22 | 23 | base_dir: impl AsRef<std::path::Path>, |
| 23 | 24 | ) -> std::io::Result<Option<git_testtools::GitDaemon>> { |
| 24 | 25 | #[cfg(feature = "blocking-network-client")] |
| @@ -31,11 +32,10 @@ pub(crate) fn spawn_git_daemon_if_async<'repo, 'a>( · 6 unmodified lines | ||
| 31 | 32 | } |
| 32 | 33 | } |
| 33 | 34 | |
| 34 | −/// Turn `remote` into a remote that interacts with the git daemon at `daemon_url`, and `repo_path` | |
| 35 | −/// can be a specific repo, or it can be empty if the repo is hosted at the root. | |
| 35 | +/// Turn `remote` into a remote that interacts with the git `daemon`, all else being the same, by creating a new stand-in remote. | |
| 36 | 36 | #[cfg(any(feature = "blocking-network-client", feature = "async-network-client-async-std"))] |
| 37 | 37 | #[cfg_attr(not(feature = "async-network-client-async-std"), allow(unused_variables))] |
| 38 | −pub(crate) fn into_daemon_remote_if_async<'repo, 'a>( | |
| 38 | +pub(crate) fn into_daemon_remote_if_async<'repo>( | |
| 39 | 39 | remote: git::Remote<'repo>, |
| 40 | 40 | daemon: Option<&git_testtools::GitDaemon>, |
| 41 | 41 | ) -> git::Remote<'repo> { |