简体   繁体   English

JGit!我可以在没有克隆存储库的情况下获取commitMessage吗?

[英]JGit!Can i get commitMessage without clone repository?

I want to get commit message and commit author through JGit without clone it. 我想通过JGit获取提交消息并提交作者,而无需克隆它。

I found the way Git.lsRemoteRepository() can access remote repository , but it just can get the commitId but not other info. 我找到了Git.lsRemoteRepository()可以访问远程存储库的方式 ,但是它只能获取commitId,而不能获取其他信息。
And i also know just clone the repository's ".git" file through JGit can get commit message and commit author,but there are too many repositories,it's impossible to clone each repository. 而且我也知道通过JGit克隆存储库的“ .git”文件可以获取提交消息和提交作者,但是存储库太多,不可能克隆每个存储库。
So is there any ways to achieve that through JGit or other java package? 那么,有什么方法可以通过JGit或其他Java包来实现这一目标?

As far as I know only the commit-ids are available without cloning due to the way the Git remote protocol is defined. 据我所知,由于Git远程协议的定义方式,只有提交ID可用而无需克隆。

For repositories hosted on GitHub you can use other Java clients, eg https://github-api.kohsuke.org/ did work for me. 对于托管在GitHub上的存储库,您可以使用其他Java客户端,例如https://github-api.kohsuke.org/对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM