commit 384eea619ec366f610d6c8070da724a7de69f1df
Author: Peter Wu <lekensteyn@gmail.com>
Date: Sat Feb 23 00:55:27 2013 +0100
Avoid reading input again if it was closed
the input would not be consumed anymore whenever --difftype was
specified for values other than 'diffy'. This happened because $lastline
is not initialized and the script thinks that it is EOF (and therefore
stops reading more data).
Patch 1: After
the input would not be consumed anymore whenever --difftype was specified for values other than 'diffy'. This happened because $lastline is not initialized and the script thinks that it is EOF (and therefore stops reading more data).
Fixes https://github.com/daveewart/colordiff/issues/22
Patch 2 adds validation of
--difftype
and prints a warning to stderr for invalid values.