Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-06-06 22:21:49 +0400
committerJunio C Hamano <gitster@pobox.com>2014-06-06 22:21:49 +0400
commitd83c9c75e1edebd4ece3ad5223103f46fc38a4d3 (patch)
treeeaa9d08f45a2dfaa53649016a10b224eda7d1298 /builtin
parent09e141f12790676d2b0297c0d5f1ca9e27140480 (diff)
parent26ecfe3e2041fe651c9682ebb73911777290ac62 (diff)
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
Diffstat (limited to 'builtin')
-rw-r--r--builtin/grep.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin/grep.c b/builtin/grep.c
index 69ac2d8797..43af5b744f 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -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);