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

Failed to apply patch with scissors

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

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

Đánh giá

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

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện lỗi với git-pw patch apply 120008 và so sánh git-pw patch download --mbox với các đầu vào --diff đang hoạt động và các đầu vào do Thunderbird tạo ra. Kiểm tra cách git-pw xây dựng mbox quanh dòng From patchwork và kiểm thử kết quả bằng git am, bao gồm cả một patch chứa scissors; hoàn thành khi patch được báo cáo có thể được áp dụng mà không cần xóa dòng đó theo cách thủ công.

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

Mô tả

I ran into the following problem while trying to apply this patch:

$ git-pw patch apply 120008
Failed to apply patch:
Applying: New '--binary-output' command line option, fix gdb.mi/ testing on Windows
error: No valid patches in input (allow with "--allow-empty")
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 New '--binary-output' command line option, fix gdb.mi/ testing on Windows

$ git am --show-current-patch=diff
--- 8< ---
$

The following things do work:

  • get the patch by saving email using Thunderbird, and use git am to apply it
  • get the patch using git-pw patch download --diff, and use patch to apply it

But this doesn't work (I suppose because it's the equivalent of git-pw patch apply):

  • use git-pw patch download --mbox and use git am to apply it

After downloading the patch in the mbox format, I took a look.

On a hunch, I removed the first line:

From patchwork Wed Sep 10 20:46:42 2025                                                        

and got:

$ git am v2-New---binary-output-command-line-option-fix-gdb.mi-testing-on-Windows.patch
Applying: New '--binary-output' command line option, fix gdb.mi/ testing on Windows
$

What I understand from this is that the mbox format that patchwork generates is incompatible with git am if the patch contains scissors.

Ngôn ngữ chính
Python
Star
39
Fork
23
Merge trung bình
48 phút
Pull request đã merge (30 ngày)
1

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

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

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 getpatchwork/git-pw

Tất cả issue của getpatchwork/git-pw

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.