sequencer: pass absolute GIT_WORK_TREE to exec commands
[gitweb.git] / sequencer.c
index 4d3f60594cbf0e9ddf2ea78e8c58eca312b4cac0..dda854779df06e28c81bfde8848c83243028f866 100644 (file)
@@ -1883,6 +1883,8 @@ static int do_exec(const char *command_line)
        fprintf(stderr, "Executing: %s\n", command_line);
        child_argv[0] = command_line;
        argv_array_pushf(&child_env, "GIT_DIR=%s", absolute_path(get_git_dir()));
+       argv_array_pushf(&child_env, "GIT_WORK_TREE=%s",
+                        absolute_path(get_git_work_tree()));
        status = run_command_v_opt_cd_env(child_argv, RUN_USING_SHELL, NULL,
                                          child_env.argv);