git-codereview: refactor getOutput/getLines into cmdOutput, trim, lines, nonBlankLines
This CL separates the "run the command and gather output" from
the "process output" operations. Doing so makes the desired
processing clearer, makes the processing available for use on
other text sources.
Also, add cmdOutputDir, for running a command in a different
directory. This is needed by the gofmt command to work around
a bug in Git, and it's made much easier by the above separation.
Reviewed-by: Alex Brainman <email@example.com>
Reviewed-by: Andrew Gerrand <firstname.lastname@example.org>
7 files changed