Add getEncoding() to RevCommit to discover the encoding
commit9a7d0dc3677067787019ab4e5ea7cd79ce013679
authorShawn O. Pearce <spearce@spearce.org>
Wed, 24 Jun 2009 03:11:48 +0000 (23 20:11 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Thu, 25 Jun 2009 05:54:39 +0000 (25 07:54 +0200)
tree61a839d3f1a87eb9566acf84964a76d27bde562c
parentf8ccc1b26e2522e532a2a25a0b315c3e8bc41382
Add getEncoding() to RevCommit to discover the encoding

If an application needs to parse the raw buffer by hand it might
benefit from knowing the encoding of the commit.  We can make it
available to them through a getEncoding() method, using the same
logic we already use for getFullMessage() and getShortMessage(),
but this is still only an estimate based on the "encoding" header
and may not be reality if the commit is horribly malformed.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.jgit.test/tst/org/spearce/jgit/revwalk/RevCommitParseTest.java
org.spearce.jgit/src/org/spearce/jgit/revwalk/RevCommit.java