X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=shell.c;h=fe2d314593ba5ee3b985b778c2e7ebfdcd9da44c;hb=67d331ef2f54c1f1bb0319cb667862441c5f6d12;hp=c3bf8ec38a3e310a87df3831fb079094462abd81;hpb=77a0837e9fd284ceaaa995d546d30228c9f4af24;p=platform%2Fupstream%2Fgit.git diff --git a/shell.c b/shell.c index c3bf8ec..fe2d314 100644 --- a/shell.c +++ b/shell.c @@ -88,7 +88,7 @@ static void run_shell(void) int count; fprintf(stderr, "git> "); - if (strbuf_getline(&line, stdin, '\n') == EOF) { + if (strbuf_getline_lf(&line, stdin) == EOF) { fprintf(stderr, "\n"); strbuf_release(&line); break; @@ -138,24 +138,13 @@ static struct commands { { NULL }, }; -int main(int argc, char **argv) +int cmd_main(int argc, const char **argv) { char *prog; const char **user_argv; struct commands *cmd; int count; - git_setup_gettext(); - - git_extract_argv0_path(argv[0]); - - /* - * Always open file descriptors 0/1/2 to avoid clobbering files - * in die(). It also avoids messing up when the pipes are dup'ed - * onto stdin/stdout/stderr in the child processes we spawn. - */ - sanitize_stdfds(); - /* * Special hack to pretend to be a CVS server */