Skip to content

Commit d336368

Browse files
committed
adapt to changes in git-repository and git-transport
1 parent 61d89f5 commit d336368

File tree

5 files changed

+30
-6
lines changed

5 files changed

+30
-6
lines changed

Diff for: etc/check-package-size.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ echo "in root: gitoxide CLI"
3131
(enter git-lock && indent cargo diet -n --package-size-limit 20KB)
3232
(enter git-config && indent cargo diet -n --package-size-limit 120KB)
3333
(enter git-config-value && indent cargo diet -n --package-size-limit 20KB)
34-
(enter git-command && indent cargo diet -n --package-size-limit 5KB)
34+
(enter git-command && indent cargo diet -n --package-size-limit 10KB)
3535
(enter git-hash && indent cargo diet -n --package-size-limit 30KB)
3636
(enter git-chunk && indent cargo diet -n --package-size-limit 10KB)
3737
(enter git-rebase && indent cargo diet -n --package-size-limit 5KB)
@@ -59,5 +59,5 @@ echo "in root: gitoxide CLI"
5959
(enter git-protocol && indent cargo diet -n --package-size-limit 80KB)
6060
(enter git-packetline && indent cargo diet -n --package-size-limit 35KB)
6161
(enter git-repository && indent cargo diet -n --package-size-limit 250KB)
62-
(enter git-transport && indent cargo diet -n --package-size-limit 75KB)
62+
(enter git-transport && indent cargo diet -n --package-size-limit 80KB)
6363
(enter gitoxide-core && indent cargo diet -n --package-size-limit 100KB)

Diff for: git-repository/src/remote/connect.rs

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ impl<'repo> Remote<'repo> {
8383
P: Progress,
8484
{
8585
let (url, version) = self.sanitized_url_and_version(direction)?;
86+
#[cfg(feature = "blocking-network-client")]
8687
let scheme_is_ssh = url.scheme == git_url::Scheme::Ssh;
8788
let transport = git_protocol::transport::connect(
8889
url,

Diff for: git-repository/tests/repository/config/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,14 @@ mod ssh_options {
3838
#[cfg(any(feature = "blocking-network-client", feature = "async-network-client"))]
3939
mod transport_options;
4040

41+
#[cfg(feature = "blocking-network-client")]
4142
use git_repository as git;
43+
#[cfg(feature = "blocking-network-client")]
4244
pub fn repo(name: &str) -> git::Repository {
4345
repo_opts(name, |opts| opts.strict_config(true))
4446
}
4547

48+
#[cfg(feature = "blocking-network-client")]
4649
pub fn repo_opts(name: &str, modify: impl FnOnce(git::open::Options) -> git::open::Options) -> git::Repository {
4750
let dir = git_testtools::scripted_fixture_read_only("make_config_repos.sh").unwrap();
4851
git::open_opts(dir.join(name), modify(git::open::Options::isolated())).unwrap()

Diff for: gitoxide-core/src/pack/receive.rs

+15-2
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,13 @@ mod blocking_io {
161161
P: Progress,
162162
P::SubProgress: 'static,
163163
{
164-
let transport = net::connect(url, protocol.unwrap_or_default().into())?;
164+
let transport = net::connect(
165+
url,
166+
git::protocol::transport::client::connect::Options {
167+
version: protocol.unwrap_or_default().into(),
168+
..Default::default()
169+
},
170+
)?;
165171
let delegate = CloneDelegate {
166172
ctx,
167173
directory,
@@ -236,7 +242,14 @@ mod async_io {
236242
P: Progress + 'static,
237243
W: io::Write + Send + 'static,
238244
{
239-
let transport = net::connect(url.to_string(), protocol.unwrap_or_default().into()).await?;
245+
let transport = net::connect(
246+
url,
247+
git::protocol::transport::client::connect::Options {
248+
version: protocol.unwrap_or_default().into(),
249+
..Default::default()
250+
},
251+
)
252+
.await?;
240253
let mut delegate = CloneDelegate {
241254
ctx,
242255
directory,

Diff for: src/plumbing/progress.rs

+9-2
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ static GIT_CONFIG: &[Record] = &[
9797
},
9898
Record {
9999
config: "core.sshCommand",
100-
usage: Planned { note: Some("unclear right now how to configure it, needs adjustment on Command based transport, must be lazy then making `connect()` a no-op essentially.") },
100+
usage: InModule { name: "repository::config", deviation: None }
101101
},
102102
Record {
103103
config: "ssh.variant",
104-
usage: Planned { note: Some("another way to select which ssh program to use, but formalizing it to choose correct arguments. Based on the basename otherwise. Detection is attempted otherwise with `-G`") },
104+
usage: InModule { name: "repository::config", deviation: Some("We error if a variant is chosen that we don't know, as opposed to defaulting to 'ssh'") }
105105
},
106106
Record {
107107
config: "core.fileMode",
@@ -884,6 +884,13 @@ static GIT_CONFIG: &[Record] = &[
884884
deviation: Some("corresponds to the EMAIL environment variable and is a fallback for `user.email`")
885885
}
886886
},
887+
Record {
888+
config: "gitoxide.ssh.commandWithoutShellFallback",
889+
usage: InModule {
890+
name: "repository::config",
891+
deviation: Some("Corresponds to the value of `GIT_SSH` and is always executed without shell and treated as fallback.")
892+
}
893+
},
887894
Record {
888895
config: "gitoxide.objects.cacheLimit",
889896
usage: InModule {

0 commit comments

Comments
 (0)