From 31741afb0c1f2fa0b609669db32e9d88f7ef2b7e Mon Sep 17 00:00:00 2001 From: Karsten Blees Date: Thu, 7 May 2015 14:18:28 +0200 Subject: [PATCH] fixup! mingw: Support `git_terminal_prompt` with more terminals Use strbuf_reset() instead of strbuf_setlen(..., 0). Signed-off-by: Karsten Blees --- compat/terminal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compat/terminal.c b/compat/terminal.c index b24d67cef7..2842fe7429 100644 --- a/compat/terminal.c +++ b/compat/terminal.c @@ -129,7 +129,7 @@ static char *xterm_prompt(const char *prompt, int echo) } close(child.in); - strbuf_setlen(&buffer, 0); + strbuf_reset(&buffer); len = strbuf_read(&buffer, child.out, 1024); close(child.out); if (len < 0) {