-
-
Notifications
You must be signed in to change notification settings - Fork 348
Rename Exponential
backoff to Quadratic
#1815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -219,6 +219,7 @@ pub fn spawn_git_daemon(working_dir: impl AsRef<Path>) -> std::io::Result<GitDae | |
.spawn()?; | ||
|
||
let server_addr = addr_at(free_port); | ||
// TODO(deps): Upgrading dependencies will require changing `Exponential` to `Quadratic`. | ||
for time in gix_lock::backoff::Exponential::default_with_random() { | ||
std::thread::sleep(time); | ||
if std::net::TcpStream::connect(server_addr).is_ok() { | ||
|
@@ -652,8 +653,8 @@ fn configure_command<'a, I: IntoIterator<Item = S>, S: AsRef<OsStr>>( | |
} | ||
|
||
fn bash_program() -> &'static Path { | ||
// TODO: use `gix_path::env::login_shell()` when available. | ||
if cfg!(windows) { | ||
// TODO(deps): Once `gix_path::env::shell()` is available, maybe do `shell().parent()?.join("bash.exe")` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am looking forward to that! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure I'm looking forward to it, actually. I'm not sure if I look forward more to the possibility that
There are also various other executables that are often but not always available, and are relevant to Git, that are not found in the same directories as the Git for Windows More broadly, this could be part of a way of figuring out how to run interpreters specified in Edit: Or maybe this is actually an alternative search behavior that should be achieved by opting into it through There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see, thanks for sharing! Finding binaries isn't straightforward and having read this, I'd be glad if providing such functionality in
If I remember correctly, on Windows this is already done via There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For So while I think this may be useful functionality, it should probably continue not to be the default, and be some combination of opt-in and/or enabled automatically only for interpreters that are very likely to be wanted from Git for Windows. This might just be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for sharing, I wasn't aware that For now I assume that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As described in the "Note" in #1840 (reply in thread), there's a separate issue that affects shebangs like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think so, and would definitely appreciate an issue or even a quick PR with a fix. Running absolute paths accidentally in such a way that it will pick up files relative to some directory sounds like a way to execute adversary-controlled binaries. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that's true. I'll try to do something for this sometime soon. Since some of the regression tests that I wrote for #1840 and expected already to pass failed due to this problem, they might be good tests for a fix, or might be possible to adapt for that purpose. So I'll look into doing at least a partial fix for this based on that, either before a fix for #1840 or at the same time. Then I can circle back later to polish things further, as well as to examine this and related shebang handling behavior in greater depth. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just as a quick and incomplete update: I have not forgotten about this, but it looks like fixing this is not a quick PR, unless the fix is to disable |
||
static GIT_BASH: Lazy<Option<PathBuf>> = Lazy::new(|| { | ||
GIT_CORE_DIR | ||
.parent()? | ||
|
Uh oh!
There was an error while loading. Please reload this page.