Skip to content

Conversation

@11happy
Copy link
Contributor

@11happy 11happy commented Nov 18, 2025

Closes #29903

Release Notes:

  • Increased timeout from 17->300 & improved the error message.

Signed-off-by: 11happy <soni5happy@gmail.com>
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Nov 18, 2025
@MrSubidubi MrSubidubi changed the title feat: increase_timeout for git operation Increase askpass timeout for git operations Nov 18, 2025
@cole-miller
Copy link
Member

Hi @11happy and thanks!

I think a better approach here might be to run git hooks in a separate step without the askpass delegate, so that they don't eat into the timeout if they run for a while. This is how I would approach it, just talking about the pre-push hook for now:

  • pre-push is supposed to run after the local remote-tracking ref (e.g. origin/main) has been updated, but before we've actually done the network operation (ref). So Zed would need to update origin/main before it runs .git/hooks/pre-push
  • pre-push receives information about the remote being pushed to in its command-line arguments, and some additional information on stdin about the refs that are being pushed (see the same page in the git docs). So Zed would need to get that information and pass it in.
  • If pre-push is successful, we should go on to do git push --no-verify, but we'll want to put the remote-tracking ref back to its initial state if pre-push or git push --no-verify fails (I believe this is how git itself behaves, but it would be good to check).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Git: Push fails with a timeout error when hooks are enabled.

2 participants