mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
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
This commit is contained in:
commit
d83c9c75e1
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue