librelist archives

« back to archive

Revision walking

Revision walking

From:
Vincent van Ravesteijn
Date:
2011-03-25 @ 21:49
Hi All,

Because of the initial work by Motiejus, I started to examine what would 
be needed to write the "git rev-list" command using libgit2. I've read 
about the ideas to push libgit2 into git itself, and about the 
objections and worries. I was triggered by this to investigate where the 
problems would arise and how far I could actually reach.

I saw that it was possible to walk the revisions in several ways, but I 
couldn't find anything that finds the (shortest) path between two commits.
- Is it correct that this is not implemented and would be useful to add 
to libgit2 ?

It would be nice if someone could shed a light about what still would be 
needed in libgit2 to produce a minimal git client. At least I know about 
the config parsing project which is needed.

Last, I hope you get some students working on the GSoC libgit2 project. 
I will try to follow their progress, albeit because it gets me some more 
knowledge about git/libgit2-programming. Maybe I can help you out 
reviewing/mentoring, but to be realistic, I am basically new to 
git/libgit2-programming, so I'm not sure what I can exactly contribute.

Greetings,

Vincent

Re: [libgit2] Revision walking

From:
Vicent Marti
Date:
2011-03-28 @ 19:55
Hey Vincent,

sorry for the delay on the answer. I've been preparing the next minor release.

On Fri, Mar 25, 2011 at 11:49 PM, Vincent van Ravesteijn <vfr@lyx.org> wrote:
> Hi All,
>
> Because of the initial work by Motiejus, I started to examine what would
> be needed to write the "git rev-list" command using libgit2. I've read
> about the ideas to push libgit2 into git itself, and about the
> objections and worries. I was triggered by this to investigate where the
> problems would arise and how far I could actually reach.
>
> I saw that it was possible to walk the revisions in several ways, but I
> couldn't find anything that finds the (shortest) path between two commits.
> - Is it correct that this is not implemented and would be useful to add
> to libgit2 ?

This is correct, it's not implemented yet and would indeed be a nice
feature to have -- although it's far from a top priority. It's not
really used to implement `git log`, so we could do without it.

> It would be nice if someone could shed a light about what still would be
> needed in libgit2 to produce a minimal git client. At least I know about
> the config parsing project which is needed.

Basically, config parsing is quite underway. The major features we are
missing are writing an index as a tree, reading a tree as an index,
and the whole network stack (which is a *very* major feature).

>
> Last, I hope you get some students working on the GSoC libgit2 project.
> I will try to follow their progress, albeit because it gets me some more
> knowledge about git/libgit2-programming. Maybe I can help you out
> reviewing/mentoring, but to be realistic, I am basically new to
> git/libgit2-programming, so I'm not sure what I can exactly contribute.

Thanks, I'm also hoping we can find somebody awesome to throw us a
hand during the Summer. We'll see how it turns out. :)

Even if you are new to Git programming, bug reports and bug fixes are
always helpful. Feel free to immerse yourself in the libgit2 code base
if you have some spare time -- I'm here to answer any questions you
may have.

Cheers,
Vicent

Re: Revision walking

From:
Vincent van Ravesteijn
Date:
2011-03-29 @ 11:56
>> I saw that it was possible to walk the revisions in several ways, but I
>> couldn't find anything that finds the (shortest) path between two commits.
>> - Is it correct that this is not implemented and would be useful to add
>> to libgit2 ?
>
> This is correct, it's not implemented yet and would indeed be a nice
> feature to have -- although it's far from a top priority. It's not
> really used to implement `git log`, so we could do without it.
>

I thought it would be needed to, for example, find the common ancestor
of two branches if you want to do: "git log A..B". Correct me if I'm
wrong.

>> It would be nice if someone could shed a light about what still would be
>> needed in libgit2 to produce a minimal git client. At least I know about
>> the config parsing project which is needed.
>
> Basically, config parsing is quite underway. The major features we are
> missing are writing an index as a tree, reading a tree as an index,

> and the whole network stack (which is a *very* major feature).

There was a GSoC student interested in this specific feature of
libgit2, so let's see how far he gets.

> Even if you are new to Git programming, bug reports and bug fixes are
> always helpful. Feel free to immerse yourself in the libgit2 code base
> if you have some spare time -- I'm here to answer any questions you
> may have.

Ok, thanks. I started with thinking about the git client to have at
least some entry to explore the lib.

Last, it would be nice if we can reuse most of the code by having such
kind of architecture. This means that if a command is changed/added to
git, it will be used immediately in git2 as well.

Well, I'm not sure whether this is feasible.

Just, my thoughts.

Vincent