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

[PATCH] Make sure the diff machinery outputs "\ No newline ..." in english

From
Fredrik Kuivinen <freku045@student.liu.se>
Date
Sep 4, 2005, 18:17 UTC
Message-ID
<20050904181724.GA23525@c165.ib.student.liu.se>

In non-english locales diff(1) do sometimes output "\ No newline at end of file" in some other language. Set LC_ALL to C before execing diff to avoid this behaviour.

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
---
 diff.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
eb6261334d65c3134d9dd822fd64e33ed8ad2dfc
diff --git a/diff.c b/diff.c
--- a/diff.c
+++ b/diff.c
@@ -207,6 +207,7 @@ static void builtin_diff(const char *nam
 		}
 	}
 	fflush(NULL);
+	putenv("LC_ALL=C");
 	execlp("/bin/sh","sh", "-c", cmd, NULL);
 }
 
Next: Junio C Hamano
Message 1 of 5 in “Make sure the diff machinery outputs "\ No newline ..." in english”
  1. Make sure the diff machinery outputs "\ No newline ..." in englishFredrik Kuivinen, Sep 4, 2005
  2. Junio C HamanoSep 4, 2005
  3. Fredrik KuivinenSep 5, 2005
  4. Linus TorvaldsSep 5, 2005
  5. Daniel BarkalowSep 6, 2005

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.