git log with git#

24 views
Skip to first unread message

Paulo

unread,
Jan 27, 2010, 11:42:20 AM1/27/10
to GitSharp
Hi,

I'm starting a monodevelop sc admin for git, and trying to learn a bit
how git# works. I've been trying achieve something similar to git log
but since log command isn't yet implemented i'm still walking around
RevWalk.cs

Can any one give me some description on how this works or will work in
git# ?

thankz,
pn

Meinrad Recheis

unread,
Jan 27, 2010, 1:59:11 PM1/27/10
to gits...@googlegroups.com
Hi Paulo,
Nice to hear, we've been waiting for someone from the monodevelop community to show up ;)
Please have a look at GitSharp.Demo how to configure RevWalk. Once configured right, it is quite easy to iterate over commits.
There is also GitSharp.Commit with its property Ancestors but I probably should reimplement it using RevWalk instead of depth first recursion over commit parents.

Cheers,
-- henon


--
For infos about GitSharp visit http://www.eqqon.com/index.php/GitSharp
To join this group visit http://groups.google.com/group/gitsharp

Meinrad Recheis

unread,
Jan 27, 2010, 2:32:48 PM1/27/10
to gits...@googlegroups.com
Paulo,
I just pushed a commit to henon/GitSharp that implements Commit.Ancestors using RevWalk. You can now iterate over the "log" by:

var r = new GitSharp.Repository("path/to/myrepo");
foreach(var Commit in r.Head.CurrentCommit.Ancestors) {
  // do something with the commit here
}

Have a nice day,
-- henon

Paulo Nobre

unread,
Jan 27, 2010, 5:56:37 PM1/27/10
to gits...@googlegroups.com
Thank you very much... I'm updating now and will test it...

Paulo

Reply all
Reply to author
Forward
0 new messages