Imported Upstream version 2.27.0
[platform/upstream/git.git] / prompt.c
index 6d5885d..5ded21a 100644 (file)
--- a/prompt.c
+++ b/prompt.c
@@ -74,3 +74,15 @@ char *git_prompt(const char *prompt, int flags)
        }
        return r;
 }
+
+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;
+}