JGit how do i get the SHA1 from a RevCommit?

亡梦爱人 提交于 2019-12-05 16:28:02

问题


This seems like an idiotic question, but I can't find documentation on it anywhere.

How do I get a the SHA1 of a RevCommit object?


回答1:


RevCommit inherits from AnyObjectId which has a getName function.

getName

public final String getName()

Returns:

string form of the SHA-1, in lower case hexadecimal.



来源:https://stackoverflow.com/questions/22276456/jgit-how-do-i-get-the-sha1-from-a-revcommit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!