class Git::CommandLine::Streaming

Executes a git command in streaming mode without buffering stdout in memory

{Git::CommandLine::Streaming} is the non-buffering strategy: it calls ‘ProcessExecuter.run` and streams stdout directly to the caller-supplied `out:` IO object. Stderr is always captured internally in a `StringIO` for error diagnostics and is available as `result.stderr`.

Use this class (via {Git::ExecutionContext#command_streaming}) for commands such as ‘cat-file -p <blob>` whose stdout may be too large to buffer in memory.

{Git::CommandLine::Capturing} is the complementary strategy for the common case where buffering stdout is acceptable.

@example Stream a blob to a file

streaming = Git::CommandLine::Streaming.new(
  {}, '/usr/bin/git', %w[--git-dir /repo/.git], Logger.new($stdout)
)
File.open('/tmp/blob', 'wb') do |f|
  streaming.run('cat-file', 'blob', sha, out: f)
end

@see Git::ExecutionContext#command_streaming

@see Git::CommandLine::Capturing

@api private