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

Re: [RFC PATCH 0/1] am: bug report and new patch format support

From
Chris Packham <judge.packham@gmail.com>
Date
Sep 3, 2014, 10:18 UTC
Message-ID
<CAFOYHZCJhGtJcBUDdQXkF6SMCmQ=XDk2D+tQ3D6e4+i9VaqGew@mail.gmail.com>
In-Reply-To
<1409736919-22341-1-git-send-email-judge.packham@gmail.com>
On Wed, Sep 3, 2014 at 9:35 PM, Chris Packham <judge.packham@gmail.com> wrote:
Show 9 quoted lines
> Hi List,
>
> When I first tried to apply a patch someone gave me I got the following
> errors.
>
>   $ git am patch.patch
>   tr: write error: Broken pipe
>   tr: write error
>   Patch format detection failed.

I can't do this with every patch. It seems to be size related, if I feed it a big enough patch it triggers the error. Somewhere around 3000 lines triggers it for me. I think the cause is the following construct in check_patch_format

  {
    ...
    tr -d '\015' <"$1" |
    ...
  } < "$1" || clean_abort
Show 14 quoted lines
>
> The patch itself was generated from gitk and while I'd seen the format
> detection problem before but the tr errors were new to me. I haven't
> looked at the tr problem yet but the gitk thing had been bugging me for
> a while so here's a patch that understands the format generated by gitk.
>
>  Documentation/git-am.txt |    3 ++-
>  git-am.sh                |   35 +++++++++++++++++++++++++++++++++++
>  2 files changed, 37 insertions(+), 1 deletion(-)
>
> Chris Packham (1):
>       am: add gitk patch format
>
>
Previous: Chris PackhamNext: Chris Packham
Message 4 of 14 in “am: bug report and new patch format support”
  1. 0/1 am: bug report and new patch format supportChris Packham, Sep 3, 2014
  2. 1/1 am: add gitk patch formatChris Packham, Sep 3, 2014
  3. Chris PackhamSep 3, 2014
  4. Chris PackhamSep 3, 2014
  5. 0/2 am: bug fix and new patch format supportChris Packham, Sep 3, 2014
  6. 1/2 am: add gitk patch formatChris Packham, Sep 3, 2014
  7. Junio C HamanoSep 3, 2014
  8. Chris PackhamSep 4, 2014
  9. Junio C HamanoSep 4, 2014
  10. Chris PackhamSep 4, 2014
  11. 2/2 am: avoid re-directing stdin twiceChris Packham, Sep 3, 2014
  12. Chris PackhamSep 5, 2014
  13. Junio C HamanoSep 5, 2014
  14. Chris PackhamSep 5, 2014

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.