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

Re: [PATCH] Re: git-am: indicate where a failed patch is to be found.

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 12, 2012, 21:55 UTC
Message-ID
<7vfw8wablm.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20120712211835.GA858@vidovic>
Nicolas Sebrecht <nicolas.s.dev@gmx.fr> writes:
Show 20 quoted lines
> The 12/07/12, Junio C Hamano wrote:
>
>> It does not matter at all that 0001-foo.patch only has a single
>> patch.  If you are going to fix up the patch after you saw "git am"
>> failed, you will be fixing .git/rebase-apply/patch with your editor
>> and re-run "git am" without arguments, at which point "git am" will
>> not look at your 0001-foo.patch file at all.
>
> Hugh! Didn't know that.
>
> Is it actually expected from users to manually edit
> .git/rebase-apply/patch path? I can't find any reference about that in
> the documentation and it really sounds like interfering with the git
> internals.
>
> Shouldn't git-am/git-rebase expose this to the user (I'm thinking about
> something like
>
>   git am --edit-offending-patch
>   git am --fix-patch

I doubt it would be very useful. As Paul says, it is a powerful way to work, but it is not for everybody, and more importantly, it is not the only way to work with the patch, once the user knows where it is.

The first problem before any of that is that we didn't tell the user where the patch is. You can re-run "git am" with different options like reject, "-3", and/or with a reduced context and many cases are handled without having to know where the patch is at all, but if the user starts wanting to know where the patch is because she wants to do things beyond that, we should just tell her where it is, instead of adding a yet another option to run an editor on it, still without telling her where it is.

Previous: Nicolas SebrechtNext: Jeff King
Message 15 of 16 in “git-am: indicate where a failed patch is to be found.”
  1. git-am: indicate where a failed patch is to be found.Paul Gortmaker, Jul 12, 2012
  2. Junio C HamanoJul 12, 2012
  3. Paul GortmakerJul 12, 2012
  4. Junio C HamanoJul 12, 2012
  5. Paul GortmakerJul 12, 2012
  6. Junio C HamanoJul 12, 2012
  7. Paul GortmakerJul 13, 2012
  8. Junio C HamanoJul 13, 2012
  9. Junio C HamanoJul 12, 2012
  10. git-am: indicate where a failed patch is to be found.Paul Gortmaker, Jul 13, 2012
  11. Junio C HamanoJul 13, 2012
  12. Paul GortmakerJul 13, 2012
  13. Junio C HamanoJul 13, 2012
  14. Re: git-am: indicate where a failed patch is to be found.Nicolas Sebrecht, Jul 12, 2012
  15. Junio C HamanoJul 12, 2012
  16. Jeff KingJul 12, 2012

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.