Skip to content

Commit c3d5ebc

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 c214f36 commit c3d5ebc

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
@@ -80,7 +80,7 @@ int git_read_line_interactively(struct strbuf *line)
8080
int ret;
8181

8282
fflush(stdout);
83-
ret = strbuf_getline_lf(line, stdin);
83+
ret = strbuf_getline(line, stdin);
8484
if (ret != EOF)
8585
strbuf_trim_trailing_newline(line);
8686

0 commit comments

Comments
 (0)