[PATCH] Add proper line ending for unit line in git save format

Linus Torvalds torvalds at linux-foundation.org
Mon Jul 11 11:51:23 PDT 2016


From: Linus Torvalds <torvalds at linux-foundation.org>
Date: Mon, 11 Jul 2016 11:47:53 -0700
Subject: [PATCH] Add proper line ending for unit line in git save format

The imperial and metric unit formats already had this, but the
personalized one missed the newline at the end.

It shouldn't really matter, since it's the last line of the file, but it
is not right.

Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---
 core/save-git.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/save-git.c b/core/save-git.c
index 0620a3f3d1fa..f174937bdd48 100644
--- a/core/save-git.c
+++ b/core/save-git.c
@@ -815,7 +815,7 @@ static void save_units(void *_b)
 	else if (prefs.unit_system == IMPERIAL)
 		put_string(b, "units IMPERIAL\n");
 	else
-		put_format(b, "units PERSONALIZE %s %s %s %s %s %s",
+		put_format(b, "units PERSONALIZE %s %s %s %s %s %s\n",
 			   prefs.units.length == METERS ? "METERS" : "FEET",
 			   prefs.units.volume == LITER ? "LITER" : "CUFT",
 			   prefs.units.pressure == BAR ? "BAR" : prefs.units.pressure == PSI ? "PSI" : "PASCAL",
-- 
2.9.0.243.g5c589a7



More information about the subsurface mailing list