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

Re: git-am failed, what's next ?

From
FMFrancis Moreau <francis.moro@gmail.com>
Date
Feb 22, 2007, 10:09 UTC
Message-ID
<38b2ab8a0702220209t33d78681gb260930069aa699b@mail.gmail.com>
In-Reply-To
<200702220848.06637.andyparkins@gmail.com>
Hi,
On 2/22/07, Andy Parkins <andyparkins@gmail.com> wrote:
> I've often wished for more information from git-am (or more correctly,
> git-apply).  However, you can sometimes get what you need to know another
> way.
>

it seems pretty the same flow that I'm used to doing except that I used 'patch' instead of 'git-apply'...

Show 11 quoted lines
>  * First, make sure that your current tree is checked in so you can get back
>    to it easily.  Maybe switch to a new temporary branch to make it easy to
>    return to your current point.
>  * Then run git-am to get the number of the failing patch, in your example
>    it's "0001"
>  * Now, try and apply the patch manually, but turn on verbose and reject in
>    git-apply
>     $ git-apply --verbose --reject .dotest/0001
>    This is the only way I've found to get git to tell you which hunk of the
>    patch is being rejected.  Unfortunately, it will also leave you with that
>    patch partially applied.

hm, I actually used 'patch' instead because I wasn't aware of '--reject' option. The default behaviour is different, and I'm not sure to know why...

Obviously I really should play with it.
> Hope that helps.
thanks
-- 
Francis
Previous: Andy ParkinsNext: Junio C Hamano
Message 3 of 10 in “git-am failed, what's next ?”
  1. Francis MoreauFeb 22, 2007
  2. Andy ParkinsFeb 22, 2007
  3. Francis MoreauFeb 22, 2007
  4. Junio C HamanoFeb 22, 2007
  5. Francis MoreauFeb 22, 2007
  6. Junio C HamanoFeb 22, 2007
  7. Francis MoreauFeb 22, 2007
  8. Andy ParkinsFeb 22, 2007
  9. Junio C HamanoFeb 22, 2007
  10. Johannes SchindelinFeb 22, 2007

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.