Skip to content

Commit

Permalink
Merge branch 'git_protocol_host'
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Nov 6, 2022
2 parents 400e058 + aa315b4 commit d13c590
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions git-transport/src/client/blocking_io/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const ENV_VARS_TO_REMOVE: &[&str] = &[
"GIT_INTERNAL_SUPER_PREFIX",
"GIT_SHALLOW_FILE",
"GIT_COMMON_DIR",
"GIT_CONFIG_COUNT",
];

/// A utility to spawn a helper process to actually transmit data, possibly over `ssh`.
Expand Down
5 changes: 3 additions & 2 deletions git-transport/src/client/git/blocking_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,14 @@ pub mod connect {
let vhost = std::env::var("GIT_OVERRIDE_VIRTUAL_HOST")
.ok()
.map(parse_host)
.transpose()?;
.transpose()?
.unwrap_or_else(|| (host.to_owned(), port));
Ok(git::Connection::new(
read,
write,
desired_version,
path,
vhost,
Some(vhost),
git::ConnectMode::Daemon,
))
}
Expand Down

0 comments on commit d13c590

Please sign in to comment.