Skip to content

Commit 34cf831

Browse files
committed
git add -i: handle CR/LF line endings in the interactive input
As of Git for Windows v2.27.0, there is an option to use Windows' newly-introduced Pseudo Console support. When running an interactive add operation with this support enabled, Git will receive CR/LF line endings. Therefore, let's not pretend that we are expecting Unix line endings. This fixes #2729 Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 5501b4a commit 34cf831

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

prompt.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ int git_read_line_interactively(struct strbuf *line)
7777
int ret;
7878

7979
fflush(stdout);
80-
ret = strbuf_getline_lf(line, stdin);
80+
ret = strbuf_getline(line, stdin);
8181
if (ret != EOF)
8282
strbuf_trim_trailing_newline(line);
8383

0 commit comments

Comments
 (0)