提交 d83c9c75 编写于 作者: J Junio C Hamano

Merge branch 'jk/grep-tell-run-command-to-cd-when-running-pager'

* jk/grep-tell-run-command-to-cd-when-running-pager:
  grep: use run-command's "dir" option for --open-files-in-pager
......@@ -361,9 +361,7 @@ static void run_pager(struct grep_opt *opt, const char *prefix)
argv[i] = path_list->items[i].string;
argv[path_list->nr] = NULL;
if (prefix && chdir(prefix))
die(_("Failed to chdir: %s"), prefix);
status = run_command_v_opt(argv, RUN_USING_SHELL);
status = run_command_v_opt_cd_env(argv, RUN_USING_SHELL, prefix, NULL);
if (status)
exit(status);
free(argv);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册