Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] JGit Client API


> SVNKit (pure Java implementation of Subversion VCS) solved that problem
> by introducing two APIs: low-level and high-level. The last one mirrors
> I think similar solution will work for EGit and other JGit related
> projects as well.

I do like this idea alot. I had discussions with people working mainly in EGit
(etc. Stefan, Jens) about exactly this topic. We started factoring out certain
parts which are common in EGit/JGit but couldn't finish because lack of time.

But when trying to put the coded needed to trigger a merge
into an area where it is reuseable from EGit and JGit CLI I learned that it can
be tricky. A CLI and a Eclipse UI may have different requirements to such an
common lib. JGit CLI and JGit newbies may wants only Strings as parameters
because that's what they have in hand and getting from Strings to the correct
ObjectIDs maybe not straightforward (e.g. getting from a tag-name to the commit
ID it represents, see proposal #320). On the other hand EGit may already have
higher level object references which it would like to use when working with the
high-level API.. EGit may want some eventing for progress bars, the option to
cancel calls to the lib and so on.

Neverthless I do think that we need a high level interface. I think it
should have
the same level of abstraction as what people are used from git
porcelain comands.
What I also like is that such the implementation of such an interface
could serve
as a good documention for jgit newbies on how to solve basic tasks with jgit.


Back to the top