summary refs log tree commit diff
path: root/ws.c
diff options
context:
space:
mode:
authorWincent Colaiuta <win@wincent.com>2007-12-14 12:23:43 +0100
committerJunio C Hamano <gitster@pobox.com>2007-12-14 20:51:58 -0800
commit420f4f04de9b3790da695918ac168d4115665d92 (patch)
tree12d42e0da97135bf4f7819baccc3396b94142654 /ws.c
parentf817546652812ad5f20a8ab4a4a7290a9759ac4e (diff)
Use shorter error messages for whitespace problems
The initial version of the whitespace_error_string() function took the
messages from builtin-apply.c rather than the shorter messages from
diff.c.

This commit addresses Junio's concern that these messages might be too
long (now that we can emit multiple warnings per line).

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ws.c')
-rw-r--r--ws.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ws.c b/ws.c
index d7d1522f8a..46cbdd6379 100644
--- a/ws.c
+++ b/ws.c
@@ -101,16 +101,16 @@ char *whitespace_error_string(unsigned ws)
 	struct strbuf err;
 	strbuf_init(&err, 0);
 	if (ws & WS_TRAILING_SPACE)
-		strbuf_addstr(&err, "Adds trailing whitespace");
+		strbuf_addstr(&err, "trailing whitespace");
 	if (ws & WS_SPACE_BEFORE_TAB) {
 		if (err.len)
 			strbuf_addstr(&err, ", ");
-		strbuf_addstr(&err, "Space in indent is followed by a tab");
+		strbuf_addstr(&err, "space before tab in indent");
 	}
 	if (ws & WS_INDENT_WITH_NON_TAB) {
 		if (err.len)
 			strbuf_addstr(&err, ", ");
-		strbuf_addstr(&err, "Indent more than 8 places with spaces");
+		strbuf_addstr(&err, "indent with spaces");
 	}
 	return strbuf_detach(&err, NULL);
 }