]> git.ipfire.org Git - thirdparty/git.git/blobdiff - prompt.c
Merge branch 'dl/switch-c-option-in-error-message'
[thirdparty/git.git] / prompt.c
index 6d5885d0096407d7d12f4511100ebee5cb5f752d..5ded21a017f1089c5a5f63c998c3b11631c0a5d6 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;
+}