- if (!strcmp(opt, "-S")) {
- warn("`%s' has been deprecated; use `tig status' instead", opt);
- opt_request = REQ_VIEW_STATUS;
- continue;
- }
-
- if (!strcmp(opt, "-l")) {
- opt_request = REQ_VIEW_LOG;
- } else if (!strcmp(opt, "-d")) {
- opt_request = REQ_VIEW_DIFF;
- } else if (check_option(opt, 'n', "line-number", OPT_INT, &opt_num_interval)) {
- opt_line_number = TRUE;
- } else if (check_option(opt, 'b', "tab-size", OPT_INT, &opt_tab_size)) {
- opt_tab_size = MIN(opt_tab_size, TABSIZE);
- } else {
- if (altargc >= ARRAY_SIZE(altargv))
- die("maximum number of arguments exceeded");
- altargv[altargc++] = opt;
- continue;
- }
-
- warn("`%s' has been deprecated", opt);
- }
-
- if (!isatty(STDIN_FILENO)) {
- opt_request = REQ_VIEW_PAGER;
- opt_pipe = stdin;
-
- } else if (i < argc || altargc > 0) {
- int alti = 0;
- size_t buf_size;
-
- if (opt_request == REQ_VIEW_MAIN)
- /* XXX: This is vulnerable to the user overriding
- * options required for the main view parser. */
- string_copy(opt_cmd, "git log --no-color --pretty=raw --boundary --parents");
- else
- string_format(opt_cmd, "git %s", subcommand);
- buf_size = strlen(opt_cmd);
-
- while (buf_size < sizeof(opt_cmd) && alti < altargc) {
- opt_cmd[buf_size++] = ' ';
- buf_size = sq_quote(opt_cmd, buf_size, altargv[alti++]);
- }
-
- while (buf_size < sizeof(opt_cmd) && i < argc) {
- opt_cmd[buf_size++] = ' ';
- buf_size = sq_quote(opt_cmd, buf_size, argv[i++]);
- }
-