Skip to content

Commit 55cbc1b

Browse files
committed
Allow use_http_path to be set in config::credential_helpers()
This allows the caller to control if credentials are stored per URL or per host, effectively.
1 parent 41e018d commit 55cbc1b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

gix/src/config/snapshot/credential_helpers.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ impl Snapshot<'_> {
4343
repo.config.lenient_config,
4444
&mut repo.filter_config_section(),
4545
repo.config.environment,
46+
false,
4647
)
4748
}
4849
}
@@ -72,6 +73,9 @@ pub(super) mod function {
7273
/// * `environment`
7374
/// - Determines how environment variables can be used.
7475
/// - Actually used are `GIT_*` and `SSH_*` environment variables to configure git prompting capabilities.
76+
/// * `use_http_path`
77+
/// - Typically, this should be false to let the `url` configuration decide if the value should be enabled.
78+
/// - If `false`, credentials are effectively per host.
7579
///
7680
/// # Deviation
7781
///
@@ -88,6 +92,7 @@ pub(super) mod function {
8892
is_lenient_config: bool,
8993
filter: &mut gix_config::file::MetadataFilter,
9094
environment: crate::open::permissions::Environment,
95+
mut use_http_path: bool,
9196
) -> Result<
9297
(
9398
gix_credentials::helper::Cascade,
@@ -97,7 +102,6 @@ pub(super) mod function {
97102
Error,
98103
> {
99104
let mut programs = Vec::new();
100-
let mut use_http_path = false;
101105
let url_had_user_initially = url.user().is_some();
102106
normalize(&mut url);
103107

0 commit comments

Comments
 (0)