Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Failed to apply patch with scissors

Aperta
#78 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
git, python
Ambito
cli, tooling

Direzione di ricerca

Inizia riproducendo il fallimento con git-pw patch apply 120008 e confronta git-pw patch download --mbox con gli input funzionanti --diff e quelli generati da Thunderbird. Esamina come git-pw costruisce l’mbox attorno alla riga From patchwork e verifica il risultato con git am, includendo una patch contenente scissors; il lavoro è completato quando la patch segnalata viene applicata senza rimuovere manualmente quella riga.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
39
Fork
23
Merge medio
48m
PR unite (30g)
1

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getpatchwork/git-pw

Tutte le issue di getpatchwork/git-pw

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.