[git pre-push] Add explanation for the mysterious nothing outcome#45653
Open
ravenblackx wants to merge 1 commit into
Open
[git pre-push] Add explanation for the mysterious nothing outcome#45653ravenblackx wants to merge 1 commit into
ravenblackx wants to merge 1 commit into
Conversation
Signed-off-by: Raven Black <ravenblack@dropbox.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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