GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fresh install ends with "fatal: unable to read" · Issue #1379 · pre-commit/pre-commit

Fresh install ends with "fatal: unable to read" #1379

New issue
Copy link
New issue
Copy link
Closed
Closed
Fresh install ends with "fatal: unable to read"#1379
Copy link

Description

@B3QL
B3QL
opened on Mar 27, 2020
Issue body actions

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]

Reacted by Mati and gnthibault

Activity

  1. asottile commented on Mar 27, 2020

    @asottile
    asottile
    on Mar 27, 2020
    Member
    More actions

    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)

  2. asottile commented on Mar 27, 2020

    @asottile
    asottile
    on Mar 27, 2020
    Member
    More actions

    please also attach the error log -- thanks

  3. asottile commented on Mar 31, 2020

    @asottile
    asottile
    on Mar 31, 2020
    Member
    More actions

    @B3QL any updates?

  4. B3QL commented on Apr 1, 2020

    @B3QL
    B3QL
    on Apr 1, 2020
    Author
    More actions

    Hey, I'll try to prepare a PoC until this weekend.

    Reacted by anthony sottile
  5. B3QL commented on Apr 5, 2020

    @B3QL
    B3QL
    on Apr 5, 2020
    Author
    More actions

    @asottile Hey, unfortunately, I can't reproduce it in docker. In the current project pre-commit clean did the job.

  6. B3QL
    closed this as completedon Apr 5, 2020
  7. asottile commented on Apr 5, 2020

    @asottile
    asottile
    on Apr 5, 2020
    Member
    More actions

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.