projects
/
platform
/
upstream
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
packaging: Add contrib installation
[platform/upstream/git.git]
/
prompt.c
diff --git
a/prompt.c
b/prompt.c
index
8181eeb
..
5ded21a
100644
(file)
--- a/
prompt.c
+++ b/
prompt.c
@@
-1,4
+1,5
@@
#include "cache.h"
#include "cache.h"
+#include "config.h"
#include "run-command.h"
#include "strbuf.h"
#include "prompt.h"
#include "run-command.h"
#include "strbuf.h"
#include "prompt.h"
@@
-74,7
+75,14
@@
char *git_prompt(const char *prompt, int flags)
return r;
}
return r;
}
-
char *git_getpass(const char *prompt
)
+
int git_read_line_interactively(struct strbuf *line
)
{
{
- return git_prompt(prompt, PROMPT_ASKPASS);
+ int ret;
+
+ fflush(stdout);
+ ret = strbuf_getline_lf(line, stdin);
+ if (ret != EOF)
+ strbuf_trim_trailing_newline(line);
+
+ return ret;
}
}