threads / discuss / 25034

git am cannot handle patches created with -B -M?

Subject: git am cannot handle patches created with -B -M?

## tl;dr

One message between Sep 8, 2010 and Sep 8, 2010.

replies: 0people: 1as markdown or json

Geert Uytterhoeven· Sep 8, 2010, 13:00 UTC · lore
Hi,

I tried applying the patch in http://www.spinics.net/lists/linux-m68k/msg03012.html using `git am', but it failed:

| Applying: m68k/m68knommu: merge MMU and non-MMU string.h
| error: arch/m68k/include/asm/string.h: already exists in index
| Patch failed at 0001 m68k/m68knommu: merge MMU and non-MMU string.h
| When you have resolved this problem run "git am --resolved".
| If you would prefer to skip this patch, instead run "git am --skip".
| To restore the original branch and stop patching run "git am --abort".
And according to `git status' no files have conflicts??
Greg said he created the patch using `git format-patch -M -B'.
The examples in the docs for format-patch say:
|       ·   The same as the previous one:
|
|               $ git format-patch -M -B origin
|
|           Additionally, it detects and handles renames and complete rewrites
|           intelligently to produce a renaming patch. A renaming patch reduces
|           the amount of text output, and generally makes it easier to review.
|           Note that non-git "patch" programs won't understand renaming
|           patches, so use it only when you know the recipient uses git to
|           apply your patch.
so I'd expect `git am' to handle it.
My git is 1.7.0.4. Is this bug fixed in a later version?
Thanks in advance!
Gr{oetje,eeting}s,
                        Geert

-- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

← back to recent threads