DORMANTno replies

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

From: Fredrik Kuivinen <hidden>
Date: 2016-06-15 22:42:05
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>


---

 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);
 }
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help