def process_result(result, normalize, chomp, timeout)
      command = result.command
      processed_out, processed_err = post_process_all([result.stdout, result.stderr], normalize, chomp)
      logger.info { "#{command} exited with status #{result}" }
      logger.debug { "stdout:\n#{processed_out.inspect}\nstderr:\n#{processed_err.inspect}" }
      Git::CommandLineResult.new(command, result, processed_out, processed_err).tap do |processed_result|
        raise Git::TimeoutError.new(processed_result, timeout) if result.timeout?
        raise Git::SignaledError.new(processed_result) if result.signaled?
        raise Git::FailedError.new(processed_result) unless result.success?
      end
    end
Process the result of the command and return a Git::CommandLineResult

Post process output, log the command and result, and raise an error if the
command failed.

@param result [ProcessExecuter::Command::Result] the result it is a Process::Status and include command, stdout, and stderr
@param normalize [Boolean] whether to normalize the output of each writer
@param chomp [Boolean] whether to chomp the output of each writer
@param timeout [Numeric, nil] the maximum seconds to wait for the command to complete

@return [Git::CommandLineResult] the result of the command to return to the caller

@raise [Git::FailedError] if the command failed
@raise [Git::SignaledError] if the command was signaled
@raise [Git::TimeoutError] if the command times out
@raise [Git::ProcessIOError] if an exception was raised while collecting subprocess output

@api private