From: "Shawn O. Pearce" <spearce@spearce.org>
To: Imran M Yousuf <imyousuf@gmail.com>
Cc: Robin Rosenberg <robin.rosenberg@dewire.com>,
git@vger.kernel.org, Dave Watson <dwatson@mimvista.com>
Subject: Re: [jgit] index v2 pull request
Date: Mon, 10 Mar 2008 20:35:26 -0400 [thread overview]
Message-ID: <20080311003526.GM8410@spearce.org> (raw)
In-Reply-To: <7bfdc29a0803100032q6b30f16el97c021f3b051b944@mail.gmail.com>
Imran M Yousuf <imyousuf@gmail.com> wrote:
> I would like to volunteer to work in JGit;
> can someone let me know where I can pick some tasks to implement?
One of the areas that I think is really weak in JGit and that we
need to do a _good_ fetch/push implementation is the branch model.
For example, if you look at Repository.getBranches() it returns
to the caller a Collection<String>.
But in Git a branch is a heck of a lot more data, and that data is
relevant to the end user when we are talking about fetch and merge.
There are many configuration options stored in .git/config for a
branch, and these are (today) created by git-branch and git-checkout
automatically as the user creates and deletes branches.
JGit has none of this model. It thinks all that a branch is is a
String. Sad.
Another thing that bothers me is the packed refs cache. We toss
away the peeled information (the "^" lines), but that data is very
useful when you are talking about fetch as well as a few other
types of operations, like plotting tag labels onto a history graph
(such as how gitk does it).
The Ref class was started as a means of wrapping up the various
important bits of data about a ref (of which branches are a subclass
and annotated tags with peeled data is another) but I suspect it
didn't quite do everything so these string APIs got created.
The above is a farily small task, one that any good OO programmer
should be able to tackle, but it can be challenging if you are
new to Git plumbing as you'll have to learn what are the important
parts of a branch/ref/annotated tag.
As a starting point look at the config file format in C Git and
see what is possible in a "branch" and "remote" section; that
data needs to be pretty readily available for any Ref, if such
data exists. The backward mapping of Ref->Remote (which does
not exist yet, unless Robin created it) is quite relevant for
tracking branches.
--
Shawn.
next prev parent reply other threads:[~2008-03-11 0:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-08 2:50 [jgit] index v2 pull request Shawn O. Pearce
2008-03-08 9:08 ` Jakub Narebski
2008-03-09 0:51 ` Shawn O. Pearce
2008-03-09 23:51 ` Robin Rosenberg
2008-03-10 7:32 ` Imran M Yousuf
2008-03-10 21:53 ` Robin Rosenberg
2008-03-12 2:52 ` Imran M Yousuf
2008-03-12 7:07 ` Robin Rosenberg
2008-03-12 7:52 ` Shawn O. Pearce
2008-03-12 8:19 ` Imran M Yousuf
2008-03-11 0:35 ` Shawn O. Pearce [this message]
2008-03-11 2:24 ` Imran M Yousuf
2008-03-10 23:31 ` Shawn O. Pearce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080311003526.GM8410@spearce.org \
--to=spearce@spearce.org \
--cc=dwatson@mimvista.com \
--cc=git@vger.kernel.org \
--cc=imyousuf@gmail.com \
--cc=robin.rosenberg@dewire.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.