Hi Matthias
Please find my replies to your questions below.
please avoid top posting which makes it very hard to follow the conversation
Regards
Khayati
Hi Matthias
Thanks for the prompt reply. Please find my replies to your questions below :-
- We have the following Git API through which we can fetch commit details. We don't have its alternative in EGit or JGit you mean ?
I don't know what you mean by "the following Git API".
JGit is the Java implementation of git this means it of course can do all the git commands available but most of them work on
your local clone of the repository similar like native git does that. If you are looking for a remote API to do this then you are
at the mercy of proprietary APIs of your Git server (e.g. GitHub or GitLab REST API). AFAIK there is no standard remote
API for commands like give me diff between this and that commit. And the reason is that git is a distributed versioning
system which means you have to first get a copy of the repository by cloning it before you can use most of the commands
on the local clone.
- Yes you are absolutely right but what I am aiming is to actually fetch the latest and latest - 1 version of all the files in a commit by using/integrating with Git libraries so that the same can be populated in my tool .
clone the repository and use JGit to access whatever version you are interested in
- Yes I was actually referring to this https://github.com/eclipse/egit-github/tree/master/org.eclipse.egit.github.core. But I believe this is just a small part of Egit plugin and you are pointing to use Jgit dierctly on which Egit is based upon to gain maximum functionality ? Though I did see various services provided by
org.eclipse.egit.github.core but I couldn't find any service which can extract the history of files or compare 2 commits of a file for me.
JGit and EGit are about handling standard git repositories.
o.e.e.github.core is about handling proprietary GitHub REST APIs.
- Thanks for acknowledging but can you tell me a general idea as what these limits would be for a Git server ?
this depends on which Git server you use
- I believe it means we cannot see others uncommitted changes unless and until they are pushed to Git server and that probably why as of today GitHUb allows to provide Pull request in committed changes only ?
Git's way to share changes is creating commits and sending them around via any
of the supported protocols (git, http, https, ssh, ftp, git bundles).
All the review tools are built on top of that and manage commits which are in review
by referencing them using some custom refs (e.g. refs/changes/00/100000 for Gerrit Code Review)
which are not standard branches. As soon as a commit is accepted it's merged into e.g. the master branch.
Once again thanks alot for your cooperation
Regards
Khayati
Hi
I am looking forward to integrate Git with my tool. Following are the operations I am looking forward.
git servers typically do not allow to fetch based on commitId for security reasons. Normally they only allow to fetch based on refs (branches, tags)
I don't understand this question. Git is a distributed versioning system this means you typically have a clone of the repository
which contains the complete history of the project. Hence there is no need to fetch again to access file content.
I don't know which SDK you are referring to. EGit is based on JGit API [1].
JGit and EGit do not limit the size of url and commit message but your git server may have limits.
So far commitIds are fixed size SHA1 hashes. This may change when the migration to SHA-256 [2] lands in native git.
Again git is a distributed versioning system where you don't have access to the local workspace of an author.
The usual way to implement code review with git is to create a commit in a user's local clone and share it via
git transport to another git repository (or send it via email as linux does) most often this repository is a server
which is always available but also peer to peer scenarios should be possible if you can establish a connection.
Examples for code review on commits in a central git repository are github, gitlab, gerrit code review.
no, this is a github API supporting the proprietary Github REST API which isn't supported by other git server implementations.
Typically such tasks are implemented on a local clone of the repository you are interested in. Since git is a distributed and not
a centralized versioning system. If you want to do this in Java use JGit.
-Matthias
_______________________________________________
egit-dev mailing list
egit-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/egit-dev