| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
This PR fixes Git.execute(..., kill_after_timeout=...) so timeouts are enforced even when output_stream is provided, aligning behavior with the documented intent and closing the gap described in #1762.
Changes:
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| git/cmd.py | Starts/cancels the timeout watchdog for output_stream runs and centralizes timeout error creation. |
| test/test_git.py | Adds a non-Windows regression test to confirm kill_after_timeout is honored with output_stream. |
git/cmd.py:1490
def communicate() -> Tuple[AnyStr, AnyStr]:
assert watchdog is not None
assert kill_check is not None
watchdog.start()
out, err = proc.communicate()
watchdog.cancel()
if kill_check.is_set():
err = make_timeout_error()
return out, err
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
The timeout error message formats `timeout` with `%d`, but `kill_after_timeout` is typed as `float` and is commonly passed as a non-integer (e.g., 0.1). This can produce a misleading message (truncation to 0) and may raise a formatting error depending on Python behavior. Format it as a float (or generic number) instead. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Thanks a lot, this circumstantially looks good to me.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Fixes #1762.
Validation
AI agent disclosure
This pull request was prepared and submitted by OpenAI Codex acting as an AI agent through the contributor account.