Commit 0a64164700d3867855a0a7f6d168fb41eb704bf0

Linquize 2014-10-04T23:27:06

config: Fix multiple trailing spaces before comments not completely trimmed

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/config_file.c b/src/config_file.c
index 7106f18..8f55c42 100644
--- a/src/config_file.c
+++ b/src/config_file.c
@@ -1163,7 +1163,7 @@ static int strip_comments(char *line, int in_quotes)
 	}
 
 	/* skip any space at the end */
-	if (ptr > line && git__isspace(ptr[-1])) {
+	while (ptr > line && git__isspace(ptr[-1])) {
 		ptr--;
 	}
 	ptr[0] = '\0';