You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fresh install ends with "fatal: unable to read" #1379
During bumping version of mypy hook from v0.740 to v0.770 I spot these error
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/Library/Developer/CommandLineTools/usr/libexec/git-core/git', 'diff', '--staged', '--name-only', '--no-ext-diff', '-z', '--diff-filter=ACMRTUXB')
return code: 128
expected return code: 0
stdout: (none)
stderr:
fatal: unable to read 0aadd30bdf64ada67f76ff3b00dcf77c811563ef
It occures only on fresh pre-commit (after pre-commit clean) once and then it works normally.
My configuration:
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: debug-statements
- repo: https://github.com/psf/black
rev: stable
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8
additional_dependencies: [
flake8-bugbear,
# Handle assigment expression https://www.python.org/dev/peps/pep-0572/
"-e",
"git+https://github.com/pycqa/pyflakes@1911c20#egg=pyflakes",
"-e",
"git+https://github.com/pycqa/pycodestyle@d219c68#egg=pycodestyle",
]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.770
hooks:
- id: mypy
- repo: https://github.com/prettier/prettier
rev: 1.19.1
hooks:
- id: prettier
args: [--prose-wrap=always, --print-width=88]
- repo: local
hooks:
- id: tests
name: run tests
entry: poetry run pytest -v
files: "test_*"
verbose: true
language: system
types: [python]
stages: [push, manual]
that error message isn't part of the installation process -- it's querying your repository for modified files
is it possible you have some other process that's performing git operations at the same time? that's the only thing I could think of that would affect that 🤔
if you could provide a docker image which reproduces this that would be super helpful, I can't think of any other way that would trigger this though (it doesn't reproduce for me)
if it's reproducible outside of docker maybe you can help me understand your setup and I can try and replicate it? versions of all the software involved (python, git, brew, etc.) as well as any applications you're running that might interface with git would be helpful
Activity
asottile commentedon Mar 27, 2020
that error message isn't part of the installation process -- it's querying your repository for modified files
is it possible you have some other process that's performing git operations at the same time? that's the only thing I could think of that would affect that 🤔
if you could provide a docker image which reproduces this that would be super helpful, I can't think of any other way that would trigger this though (it doesn't reproduce for me)
asottile commentedon Mar 27, 2020
please also attach the error log -- thanks
asottile commentedon Mar 31, 2020
@B3QL any updates?
B3QL commentedon Apr 1, 2020
Hey, I'll try to prepare a PoC until this weekend.
B3QL commentedon Apr 5, 2020
@asottile Hey, unfortunately, I can't reproduce it in docker. In the current project
pre-commit cleandid the job.asottile commentedon Apr 5, 2020
if it's reproducible outside of docker maybe you can help me understand your setup and I can try and replicate it? versions of all the software involved (python, git, brew, etc.) as well as any applications you're running that might interface with git would be helpful