[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jgit-dev] commit hash as a hex string
|
You are my hero of today. Works. Ambiguous name "name", ;-) I was
looking for something in the spirit of "idAsHexString" and overlooked
"name".
On Sat, 2012-07-14 at 19:36 +0100, Roberto Tyley wrote:
> .name() I think?
>
> On Jul 14, 2012 7:27 PM, "CG" <cg@xxxxxxxxx> wrote:
> ### Problem: Given
>
> RevCommit commitId = ...
>
> From this I want to get the commit id in a string in hex
> format.
>
> ### Attempt 1
>
> commitId.toString
>
> gives the hex + additional information, such as commit-time
> that I don't
> want in the string.
>
> ### Attempt 2
>
> commitId.asObjectId.toString
>
> same result as attempt 1
>
> Of course, I can solve this in an ugly way by doing some regex
> matching,
> but probably there is a more elegant way.
>
> Any idea?
>
> TIA
>
>
>
>
>
>
>
> _______________________________________________
> jgit-dev mailing list
> jgit-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jgit-dev