]> git.ipfire.org Git - thirdparty/git.git/blobdiff - shell.c
Merge branch 'jt/t5500-unflake'
[thirdparty/git.git] / shell.c
diff --git a/shell.c b/shell.c
index 54cca7439de636daa37b7f8627c5cdd8bb431703..cef7ffdc9e1d3040930841134577c591cf02f650 100644 (file)
--- a/shell.c
+++ b/shell.c
@@ -4,6 +4,7 @@
 #include "strbuf.h"
 #include "run-command.h"
 #include "alias.h"
+#include "prompt.h"
 
 #define COMMAND_DIR "git-shell-commands"
 #define HELP_COMMAND COMMAND_DIR "/help"
@@ -76,12 +77,11 @@ static void run_shell(void)
                int count;
 
                fprintf(stderr, "git> ");
-               if (strbuf_getline_lf(&line, stdin) == EOF) {
+               if (git_read_line_interactively(&line) == EOF) {
                        fprintf(stderr, "\n");
                        strbuf_release(&line);
                        break;
                }
-               strbuf_trim(&line);
                rawargs = strbuf_detach(&line, NULL);
                split_args = xstrdup(rawargs);
                count = split_cmdline(split_args, &argv);