Skip to content

Commit

Permalink
keep track of no_proxy environment variable support
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Nov 15, 2022
1 parent ee0276c commit f0625de
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 0 additions & 4 deletions git-repository/src/discover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ impl ThreadSafeRepository {
///
/// Finally, use the `trust_map` to determine which of our own repository options to use
/// based on the trust level of the effective repository directory.
// TODO: GIT_HTTP_PROXY_AUTHMETHOD, GIT_PROXY_SSL_CERT, GIT_PROXY_SSL_KEY, GIT_PROXY_SSL_CERT_PASSWORD_PROTECTED.
// GIT_PROXY_SSL_CAINFO, GIT_SSL_VERSION, GIT_SSL_CIPHER_LIST, GIT_HTTP_MAX_REQUESTS, GIT_CURL_FTP_NO_EPSV,
// GIT_HTTP_LOW_SPEED_LIMIT, GIT_HTTP_LOW_SPEED_TIME, GIT_HTTP_USER_AGENT
// The vars above should end up as overrides of the respective configuration values (see git-config).
pub fn discover_with_environment_overrides_opts(
directory: impl AsRef<Path>,
mut options: upwards::Options,
Expand Down
5 changes: 5 additions & 0 deletions git-repository/src/open.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,11 @@ impl ThreadSafeRepository {
/// Note that this will read various `GIT_*` environment variables to check for overrides, and is probably most useful when implementing
/// custom hooks.
// TODO: tests, with hooks, GIT_QUARANTINE for ref-log and transaction control (needs git-sec support to remove write access in git-ref)
// TODO: The following vars should end up as overrides of the respective configuration values (see git-config).
// GIT_HTTP_PROXY_AUTHMETHOD, GIT_PROXY_SSL_CERT, GIT_PROXY_SSL_KEY, GIT_PROXY_SSL_CERT_PASSWORD_PROTECTED.
// GIT_PROXY_SSL_CAINFO, GIT_SSL_VERSION, GIT_SSL_CIPHER_LIST, GIT_HTTP_MAX_REQUESTS, GIT_CURL_FTP_NO_EPSV,
// GIT_HTTP_LOW_SPEED_LIMIT, GIT_HTTP_LOW_SPEED_TIME, GIT_HTTP_USER_AGENT,
// no_proxy, NO_PROXY, http_proxy, HTTPS_PROXY, https_proxy, ALL_PROXY, all_proxy
pub fn open_with_environment_overrides(
fallback_directory: impl Into<PathBuf>,
trust_map: git_sec::trust::Mapping<Options>,
Expand Down
6 changes: 6 additions & 0 deletions src/plumbing/progress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,12 @@ static GIT_CONFIG: &[Record] = &[
deviation: None
}
},
Record {
config: "gitoxide.http.noProxy",
usage: NotPlanned {
reason: "on demand, without it it's not possible to implement environment overrides via `no_proxy` or `NO_PROXY` for a list of hostnames or `*`"
}
},
];

/// A programmatic way to record and display progress.
Expand Down

0 comments on commit f0625de

Please sign in to comment.