def post_process(raw_output, normalize, chomp)
      if raw_output.respond_to?(:string)
        output = raw_output.string.dup
        output = output.lines.map { |l| Git::EncodingUtils.normalize_encoding(l) }.join if normalize
        output.chomp! if chomp
        output
      else
        nil
      end
    end
Determine the output to return in the `CommandLineResult`

If the writer can return the output by calling `#string` (such as a StringIO),
then return the result of normalizing the encoding and chomping the output
as requested.

If the writer does not support `#string`, then return nil. The output is
assumed to be collected by the writer itself such as when the  writer
is a file instead of a StringIO.

@param raw_output [#string] the output to post-process
@return [String, nil]

@api private