]> git.ipfire.org Git - thirdparty/git.git/blobdiff - add-patch.c
Merge branch 'jt/t5500-unflake'
[thirdparty/git.git] / add-patch.c
index d8dafa8168dc8389468d8c2c3cd6221220826605..d8bfe379be4d50893b8b977efff9c79de54b38af 100644 (file)
@@ -7,6 +7,7 @@
 #include "color.h"
 #include "diff.h"
 #include "compat/terminal.h"
+#include "prompt.h"
 
 enum prompt_mode_type {
        PROMPT_MODE_CHANGE = 0, PROMPT_DELETION, PROMPT_HUNK,
@@ -1158,9 +1159,8 @@ static int read_single_character(struct add_p_state *s)
                return res;
        }
 
-       if (strbuf_getline(&s->answer, stdin) == EOF)
+       if (git_read_line_interactively(&s->answer) == EOF)
                return EOF;
-       strbuf_trim_trailing_newline(&s->answer);
        return 0;
 }