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

git-am doesn't apply the rest of the email after a partial patch fail?

From
CMConstantine A. Murenin <mureninc@gmail.com>
Date
Apr 7, 2013, 18:00 UTC
Message-ID
<CAPKkNb43bWupbOaAntF8VJQ8ZJjt8SG-mZa3GohxZEAZQm-evQ@mail.gmail.com>
Hi,

I'm trying to convert/rebase about 40 local patches from an old mercurial fork of OpenGrok (upstream used to use hg), to the new git repository (upstream has recently switched to github).

What I decided to do is convert my old mercurial repo to git (by pushing with py-hg-git to a git repository, and then checking out with git), and use `git format-patch` from an old .hg-git.git repository, and then use `git am` on the new (upstream git) repository of the `format-patch` mails from an old one.

However, what I've faced with, is that when a conflict happens, and I resolve, and do `git add`, and `git am --resolved`, then the rest of the `format-patch` email where the conflict has occurred is discarded, and the subsequent patch/email now doesn't want to apply either, since all of the previous patch/email is missing, other than the manually added changes.

What gives? Does `git am --resolve` discard the rest of the mail, if any patching errors occur? Is one supposed to apply the whole `format-patch` email manually when `git am` does encounter some problem with only some minor parts of that email?

% git --version; uname -rms git version 1.7.6 OpenBSD 5.2 amd64

C.
Next: Constantine A. Murenin
Message 1 of 5 in “git-am doesn't apply the rest of the email after a partial patch fail?”
  1. Constantine A. MureninApr 7, 2013
  2. Constantine A. MureninApr 7, 2013
  3. Junio C HamanoApr 8, 2013
  4. Constantine A. MureninApr 9, 2013
  5. Junio C HamanoApr 9, 2013

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.