From: Junio C Hamano Date: Sat, 27 Oct 2007 06:17:14 +0000 (-0700) Subject: Merge branch 'ph/color-test' X-Git-Tag: v1.5.4-rc0~322 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/dc2715554eae139ac6babbce1f973f83a7a4fedc?hp=1ece127467c1d65062f17777b1eedcd84fd9ea69 Merge branch 'ph/color-test' * ph/color-test: Support a --quiet option in the test-suite. Add some fancy colors in the test library when terminal supports it. --- diff --git a/fast-import.c b/fast-import.c index 6f888f6476..f93d7d6c9b 100644 --- a/fast-import.c +++ b/fast-import.c @@ -1616,6 +1616,7 @@ static void cmd_data(struct strbuf *sb) char *term = xstrdup(command_buf.buf + 5 + 2); size_t term_len = command_buf.len - 5 - 2; + strbuf_detach(&command_buf, NULL); for (;;) { if (strbuf_getline(&command_buf, stdin, '\n') == EOF) die("EOF in data (terminator '%s' not found)", term); diff --git a/templates/hooks--pre-commit b/templates/hooks--pre-commit index 18b87309f6..a19279b3e4 100644 --- a/templates/hooks--pre-commit +++ b/templates/hooks--pre-commit @@ -58,7 +58,7 @@ perl -e ' if (/\s$/) { bad_line("trailing whitespace", $_); } - if (/^\s* /) { + if (/^\s* \t/) { bad_line("indent SP followed by a TAB", $_); } if (/^(?:[<>=]){7}/) {