Skip to content

Add a timeout to git fetch in precommit hook #3237

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

Merged
merged 2 commits into from
Jun 19, 2020
Merged

Add a timeout to git fetch in precommit hook #3237

merged 2 commits into from
Jun 19, 2020

Conversation

hsubox76
Copy link
Contributor

I was always a bit nervous about putting a network request into a precommit hook. This will fail the fetch and continue the commit if it doesn't fetch within 10 seconds. If it fails the only cost is that the prettier and license diffs may be a bit outdated, not worth blocking a commit. But it seems useful to at least attempt to fetch first, if it doesn't take too long.

@google-oss-bot
Copy link
Contributor

Binary Size Report

Affected SDKs

No changes between base commit (ee421d2) and head commit (0aefc67).

Test Logs

@hsubox76 hsubox76 merged commit 35bc0a2 into master Jun 19, 2020
@firebase firebase locked and limited conversation to collaborators Jul 20, 2020
@hsubox76 hsubox76 deleted the ch-commit branch January 21, 2021 20:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants