Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] from SHA-1 hex string to RevCommit-object

You probably want to create a RevWalk and then call parseCommit():

ObjectId has static factory methods to parse a string into an ObjectId instance, you can also try repository.resolve() if you want to handle branch names etc.

On 19 Jul 2012 22:35, "CG" <cg@xxxxxxxxx> wrote:
Now the other way around: given a SHA-1 in a hex String representing a
commit, question: produce the corresponding RevCommit object? Is there a
direct method for this purpose which can "eat" the given string wthout
further formatting?

TIA (Maria)

jgit-dev mailing list

Back to the top