Support commit encoding header
Commit objects may contain an encoding, supposedly meant to
indicated the encoding used for that particular commt.
This is the last header line before the comment as far as I know.
Unfortunately the encoding header only reflects a setting in the
config file, so it is most likely to be wrong by default unless
you are on a UTF-8 platform (in which case the header isn't really
needed). Later on we'll have to decode that more intelligently. For
now we make an attempt to decode according to the setting if present,
otherwise we use the platform default.
[sp: Changed String constructor to a version that is supported
on Java 5. Modified unit tests to be stable across systems.
For unknown reasons these were coming up with different time
values and timestamps on my system vs. Robin's.]
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>