mirror of
https://github.com/git/git.git
synced 2024-11-30 21:44:02 +08:00
08d383f23e
There are quite a few code locations (e.g. `git clean --interactive`) where Git asks the user for an answer. In preparation for fixing a bug shared by all of them, and also to DRY up the code, let's refactor it. Please note that most of these callers trimmed white-space both at the beginning and at the end of the answer, instead of trimming only the end (as the caller in `add-patch.c` does). Therefore, technically speaking, we change behavior in this patch. At the same time, it can be argued that this is actually a bug fix. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 lines
223 B
C
12 lines
223 B
C
#ifndef PROMPT_H
|
|
#define PROMPT_H
|
|
|
|
#define PROMPT_ASKPASS (1<<0)
|
|
#define PROMPT_ECHO (1<<1)
|
|
|
|
char *git_prompt(const char *prompt, int flags);
|
|
|
|
int git_read_line_interactively(struct strbuf *line);
|
|
|
|
#endif /* PROMPT_H */
|