git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Geert Uytterhoeven <geert@linux-m68k.org>
Date
Sep 8, 2010, 13:00 UTC
Message-ID
<AANLkTinX=52AofapdhEmAZX3ergn-JKtTc5_3ZCa9G_0@mail.gmail.com>
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
Message 1 of 1 in “git am cannot handle patches created with -B -M?”
  1. Geert UytterhoevenSep 8, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.