Skip to content

Commit ea58ada

Browse files
committed
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
2 parents c4c628f + 711a208 commit ea58ada

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

prompt.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,6 @@ char *git_prompt(const char *prompt, int flags)
7777

7878
int git_read_line_interactively(struct strbuf *line)
7979
{
80-
int ret;
81-
8280
fflush(stdout);
83-
ret = strbuf_getline_lf(line, stdin);
84-
if (ret != EOF)
85-
strbuf_trim_trailing_newline(line);
86-
87-
return ret;
81+
return strbuf_getline(line, stdin);
8882
}

0 commit comments

Comments
 (0)