summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f817546)
raw | patch | inline | side by side (parent: f817546)
author | Wincent Colaiuta <win@wincent.com> | |
Fri, 14 Dec 2007 11:23:43 +0000 (12:23 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 15 Dec 2007 04:51:58 +0000 (20:51 -0800) |
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>
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>
t/t4015-diff-whitespace.sh | patch | blob | history | |
ws.c | patch | blob | history |
index 05ef78b2c0875d775461227f8368fac370b20dbc..9bff8f5e4bae6beb22ba31e8be03a0528e06519e 100755 (executable)
# This is indented with SP HT SP.
echo " foo();" > x &&
- git diff --check | grep "Space in indent is followed by a tab"
+ git diff --check | grep "space before tab in indent"
'
index d7d1522f8a177639d3269e5e9a83be39a14a7d89..46cbdd63793aad534d8d8b640df7fd2e86c7d915 100644 (file)
--- a/ws.c
+++ b/ws.c
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);
}