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

missing handling of "No newline at end of file" in git am

From
Olaf Hering <olaf@aepfle.de>
Date
Feb 14, 2017, 20:11 UTC
Message-ID
<20170214201104.GA26407@aepfle.de>

How is git send-email and git am supposed to handle a text file which lacks a newline at the very end? This is about git 2.11.0.

Right now the patch in an email generated with 'git send-email' ends with '\ No newline at end of file', which 'git am' can not handle. To me it looks like whatever variant of "diff" is used does the right thing and indicates the lack of newline. Just the used variant of "patch" does not deal with it.

Olaf
Next: Junio C Hamano
Message 1 of 6 in “missing handling of "No newline at end of file" in git am”
  1. Olaf HeringFeb 14, 2017
  2. Junio C HamanoFeb 14, 2017
  3. Olaf HeringFeb 14, 2017
  4. Olaf HeringFeb 15, 2017
  5. Eric WongFeb 20, 2017
  6. Jeff KingFeb 14, 2017

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.