diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-08-04 08:10:34 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-08-04 08:10:34 -0700 |
| commit | ea58adaeb9687dd2ed7b9f3a7b309ebe954c6576 (patch) | |
| tree | be3a7ac745c80fded142b4b7cd57f2a227d17742 | |
| parent | Merge branch 'ps/meson-clar-decls-fix' (diff) | |
| parent | interactive: do strip trailing CRLF from input (diff) | |
| download | git-ea58adaeb9687dd2ed7b9f3a7b309ebe954c6576.tar.gz git-ea58adaeb9687dd2ed7b9f3a7b309ebe954c6576.zip | |
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
| -rw-r--r-- | prompt.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -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); } |
