Skip to content

Commit 1e322a8

Browse files
dschomjcheetham
authored andcommitted
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 4edc6a9 commit 1e322a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

prompt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ int git_read_line_interactively(struct strbuf *line)
7878
int ret;
7979

8080
fflush(stdout);
81-
ret = strbuf_getline_lf(line, stdin);
81+
ret = strbuf_getline(line, stdin);
8282
if (ret != EOF)
8383
strbuf_trim_trailing_newline(line);
8484

0 commit comments

Comments
 (0)