A framework for managing and maintaining multi-language pre-commit hooks.
Find a file
Wade Carpenter feb0d34213
pre-push: fix stdin line splitting when <local ref> has whitespace
From the `pre-push.sample` file:

> Information about the commits which are being pushed is supplied as
> lines to the standard input in the form:
>
>   <local ref> <local sha1> <remote ref> <remote sha1>

When `<local ref>` is not simply a branch name, but a more general
ref (see git-rev-parse(1)), it could contain whitespace, and that
breaks the split() call that expected only 3 spaces in the line.

Changed to use `rsplit(maxsplit=3)` since only the <local ref> is
likely to have embedded whitespace.

Added a new test case for the same.
2022-04-14 14:27:46 -07:00
.github/ISSUE_TEMPLATE Use org-default .github/FUNDING.yml 2021-11-23 11:24:26 -05:00
pre_commit pre-push: fix stdin line splitting when <local ref> has whitespace 2022-04-14 14:27:46 -07:00
testing fix tests for golang 1.18 2022-04-13 17:52:55 -04:00
tests pre-push: fix stdin line splitting when <local ref> has whitespace 2022-04-14 14:27:46 -07:00
.gitignore remove unneeded gitignore lines 2022-03-13 19:55:30 -04:00
.pre-commit-config.yaml [pre-commit.ci] pre-commit autoupdate 2022-04-11 20:54:45 +00:00
.pre-commit-hooks.yaml fix casing in .pre-commit-hooks.yaml 2021-07-03 11:14:05 -07:00
azure-pipelines.yml update master to main 2022-03-24 13:52:25 -04:00
CHANGELOG.md v2.18.1 2022-04-02 21:32:54 -04:00
CONTRIBUTING.md update master to main 2022-03-24 13:52:25 -04:00
LICENSE MIT 2014-06-05 08:57:40 -07:00
README.md update master to main 2022-03-24 13:52:25 -04:00
requirements-dev.txt always use #!/bin/sh on windows 2022-01-05 13:22:49 -05:00
setup.cfg v2.18.1 2022-04-02 21:32:54 -04:00
setup.py drop python 3.6 support 2022-01-18 18:44:20 -05:00
tox.ini drop python 3.6 support 2022-01-18 18:44:20 -05:00

Build Status Azure DevOps coverage pre-commit.ci status

pre-commit

A framework for managing and maintaining multi-language pre-commit hooks.

For more information see: https://pre-commit.com/