Previously this was only done for ssh based connections, and requires setting an environment variable.
Unified · Split
| @@ -68,7 +68,9 @@ impl SpawnProcessOnDemand { · 67 unmodified lines | |||
| 68 | path, | 68 | path, |
| 69 | ssh_program: None, | 69 | ssh_program: None, |
| 70 | ssh_args: Vec::new(), | 70 | ssh_args: Vec::new(), |
| 71 | ssh_env: Vec::new(), | 71 | ssh_env: (version != Protocol::V1) |
| 72 | .then(|| vec![("GIT_PROTOCOL", format!("version={}", version as usize))]) | ||
| 73 | .unwrap_or_default(), | ||
| 72 | child: None, | 74 | child: None, |
| 73 | connection: None, | 75 | connection: None, |
| 74 | desired_version: version, | 76 | desired_version: version, |