mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
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. |
||
|---|---|---|
| .. | ||
| commands | ||
| languages | ||
| meta_hooks | ||
| resources | ||
| __init__.py | ||
| __main__.py | ||
| clientlib.py | ||
| color.py | ||
| constants.py | ||
| envcontext.py | ||
| error_handler.py | ||
| errors.py | ||
| file_lock.py | ||
| git.py | ||
| hook.py | ||
| logging_handler.py | ||
| main.py | ||
| output.py | ||
| parse_shebang.py | ||
| prefix.py | ||
| repository.py | ||
| staged_files_only.py | ||
| store.py | ||
| util.py | ||
| xargs.py | ||