Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

git apply error when using git-crypt

Đang mở
#776 16 bình luận 4 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
38/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
git, python
Lĩnh vực
devtools

Hướng nghiên cứu

Reproduce the failure with the shown .pre-commit-config.yaml, .gitattributes entry, Git 2.18.0, and pre-commit 1.10.2, starting from the reported git apply invocation during conflicted stash restoration. Done means the commit and hook auto-fix workflow no longer ends with the reported unrecognized-input error.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

Hi. I am currently using git-crypt in tandem with some pre-commit hooks

Upon adding a new file for encryption --> a corresponding .gitattributes entry --> git commit -m "blah" I encounter the following error:

[WARNING] Unstaged files detected.
[INFO] Stashing unstaged files to /Users/bob/.cache/pre-commit/patch1530518673.
Trim Trailing Whitespace.................................................Passed
Check Yaml...............................................................Passed
Fix End of Files.........................................................Passed
Ansible-lint.............................................................Passed
[WARNING] Stashed changes conflicted with hook auto-fixes... Rolling back fixes...
An unexpected error has occurred: CalledProcessError: Command: ('/usr/local/Cellar/git/2.18.0/libexec/git-core/git', '-c', 'core.autocrlf=false', 'apply', '--whitespace=nowarn', '/Users/bob/.cache/pre-commit/patch1530518673')
Return code: 128
Expected return code: 0
Output: (none)
Errors:
    error: unrecognized input

git version: 2.18.0
pre-commit version: 1.10.2
.pre-commit-config.yaml

repos:
-   repo: git://github.com/pre-commit/pre-commit-hooks
    rev: v1.3.0
    hooks:
    -   id: trailing-whitespace
    -   id: check-yaml
    -   id: end-of-file-fixer
-   repo: https://github.com/willthames/ansible-lint.git
    rev: v3.4.23
    hooks:
    - id: ansible-lint
      entry: ansible-lint bootstrap.yml

.gitattributes:

hosts/testing/secret-vars.yml filter=git-crypt diff=git-crypt
Ngôn ngữ chính
Python
Star
15.6k
Fork
1k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pre-commit/pre-commit

Tất cả issue của pre-commit/pre-commit

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.