about summary refs log tree commit diff
path: root/third_party/git/prompt.c
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/git/prompt.c')
-rw-r--r--third_party/git/prompt.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/third_party/git/prompt.c b/third_party/git/prompt.c
index 6d5885d009..5ded21a017 100644
--- a/third_party/git/prompt.c
+++ b/third_party/git/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;
+}