So, I was working on a project in which I have to find the list of commits between any two commits, By cloning the repo, we can do it using simple diff, But I want to find a way in which we don't have to clone the full repo, and find the commits only.
Asked
Active
Viewed 152 times
1 Answers
0
Even without JGit, you would still need to clone a repository in order to query its log history.
JGit uses git.log().addRange(from, to).call();
, with from
and to
the peeled object of the commits.
But that call is done within a local repository.
For anything involving a remote repository only, you would need the GitHub API, like its compare REST API, provided you are ready to manage its pagination.
JGit is likely not involved for that kind of call. A gh api
call would.

VonC
- 1,262,500
- 529
- 4,410
- 5,250