mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-10-06 05:57:38 -04:00
A render is about to have a second way of giving the diff renderer the command's output, so the part that decides how it runs needs to be apart from the part that does. Move the setting up to newRenderTask, named for what it does now that a pty is one of two ways of doing it. Leave the pty with the pair of functions a task drives it by, and with naming the stdin filter to git as its pager, since git only runs a pager when it talks to a terminal. What a way needs to know about the render it runs travels as a renderSpec. Running the command plainly, with its output going straight into a pipe, is a way of its own already, and newCmdTask ends as newRenderTask does, by creating the task that reads the output into the view. Put the plain way on the same seam as plainRender, and share the ending as newTaskForRender. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>