Skip to content

[git pre-push] Add explanation for the mysterious nothing outcome#45653

Open
ravenblackx wants to merge 1 commit into
envoyproxy:mainfrom
ravenblackx:prepush_hooks
Open

[git pre-push] Add explanation for the mysterious nothing outcome#45653
ravenblackx wants to merge 1 commit into
envoyproxy:mainfrom
ravenblackx:prepush_hooks

Conversation

@ravenblackx

Copy link
Copy Markdown
Contributor

Commit Message: [git pre-push] Add explanation for the mysterious nothing outcome
Additional Description: The git pre-push hooks sometimes just exit silently without actually doing the push, the cause of which has finally been tracked down to "it's not the hook, it's the git stuff around the hook that expires a connection and then fails without output". This makes it so if that's likely to have happened, the hook at least gives you a coherent explanation of what's up and what to do, so the next person to be baffled by this doesn't have to do all the diagnostics.

I tried to come up with a way to make the hook faster in the unwarmed state, and it seems to be a losing game - if we want to make sure the tools are all up to date then we could offload them into a tools repo and make them prebuild at startup like clang-format and clangd do (which has its own problem, in the container they should really have a wrapper that blocks until they're built, to stop vscode from flipping out about unready tools). But short of that, and that alone wouldn't help anyway since one tool is using do_ci, the useful thing is to make the hook at least explain itself.
Risk Level: None, only git pre-push hook that almost nobody uses.
Testing: Used the updated hook when pushing this PR.
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Raven Black <ravenblack@dropbox.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants