Merge branch 'js/prompt-crlf-fix'
Interactive prompt code did not correctly strip CRLF from the end of line on Windows. * js/prompt-crlf-fix: interactive: do strip trailing CRLF from input
This commit is contained in:
8
prompt.c
8
prompt.c
@@ -77,12 +77,6 @@ char *git_prompt(const char *prompt, int flags)
|
||||
|
||||
int git_read_line_interactively(struct strbuf *line)
|
||||
{
|
||||
int ret;
|
||||
|
||||
fflush(stdout);
|
||||
ret = strbuf_getline_lf(line, stdin);
|
||||
if (ret != EOF)
|
||||
strbuf_trim_trailing_newline(line);
|
||||
|
||||
return ret;
|
||||
return strbuf_getline(line, stdin);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user