mirror of
https://github.com/git/git.git
synced 2026-02-10 09:48:09 +00:00
fixup! mingw: Support git_terminal_prompt with more terminals
Also strip trailing CRLF instead of just LF or just CR. Signed-off-by: Karsten Blees <blees@dcon.de>
This commit is contained in:
@@ -137,10 +137,8 @@ static char *xterm_prompt(const char *prompt, int echo)
|
||||
goto ret;
|
||||
}
|
||||
|
||||
if (len && buffer.buf[len - 1] == '\n')
|
||||
strbuf_setlen(&buffer, len - 1);
|
||||
if (len && buffer.buf[len - 1] == '\r')
|
||||
strbuf_setlen(&buffer, len - 1);
|
||||
strbuf_strip_suffix(&buffer, "\n");
|
||||
strbuf_strip_suffix(&buffer, "\r");
|
||||
|
||||
ret:
|
||||
if (!code)
|
||||
|
||||
Reference in New Issue
Block a user