threads / discuss / 5028

Java GIT/Eclipse GIT version 0.1.1

Subject: Java GIT/Eclipse GIT version 0.1.1

## tl;dr

12 messages between Jul 28, 2006 and Jul 31, 2006.

replies: 11people: 5as markdown or json

Shawn Pearce· Jul 28, 2006, 06:36 UTC · lore

My Java GIT library and Eclipse GIT team provider is now at a point where it may be partially useful to someone else who is also trying to write something which interacts with GIT. Or who might also be interested in seeing a pure-Java Eclipse team provider for GIT.

So I've posted my repository (currently ~200 KB) on my website:
  http://www.spearce.org/projects/scm/egit.git

The underlying Java library is fairly functional and can read and write a repository. Creating a series of Ant tasks for use in an automated build environment would probably be pretty trivial with this library.

The Eclipse plugin can't commit. Or do a lot of other really useful things. So its not end-user ready. :-)

The code is licensed under the Apache License, version 2.0.

I would appreciate any and all input, feedback, etc. that anyone might have on this library or plugin. Patches are of course certainly welcome. :-)

For what its worth I'm trying to keep this library and Eclipse plugin 100% pure Java and avoid calling out to the canonical C implementation of GIT. However I have no plans to implement the delta packing algorithm used by git-pack-objects. Consequently if this code ever produces packs it will be strictly zlib deflated objects without delta compression.

-- 
Shawn.
Peter Baumann· Jul 28, 2006, 06:49 UTC · re: Shawn Pearce · lore

Re: Java GIT/Eclipse GIT version 0.1.1

On 2006-07-28, Shawn Pearce <spearce@spearce.org> wrote:
Show 9 quoted lines
> My Java GIT library and Eclipse GIT team provider is now at a point
> where it may be partially useful to someone else who is also trying
> to write something which interacts with GIT.  Or who might also
> be interested in seeing a pure-Java Eclipse team provider for GIT.
>
> So I've posted my repository (currently ~200 KB) on my website:
>
>   http://www.spearce.org/projects/scm/egit.git
>
Doesn't work for me.

devil:~/src git clone http://www.spearce.org/projects/scm/egit.git error: File ac32c7cc2f7cf87a1ed80d0cdfca2af2a0385bb2 (http://www.spearce.org/projects/scm/egit.git/objects/ac/32c7cc2f7cf87a1ed80d0cdfca2af2a0385bb2) corrupt Getting pack list for http://www.spearce.org/projects/scm/egit.git/ Getting alternates list for http://www.spearce.org/projects/scm/egit.git/ Also look at <html xmlns="http://www.w3.org/1999/ Also look at <title>Insufficiently Random: The lonely musings of a loosely connected software developer.< Also look at @import url( http://www.spearce.org/wordpress/wp-content/themes/ir-classic/style Also look at <link rel="pingback" href="http://www.spearce.org/wordpress/xmlrpc. Also look at <link rel='archives' title='April 2006' href='http://www.spearce.org/2006/ Also look at <link rel='archives' title='February 2006' href='http://www.spearce.org/2006/ [...] Also look at <li><a href="feed:http://www.spearce.org/comments/feed/" title="The latest comments to all posts in RSS">Comments <abbr title="Really Simple Syndication">RSS</abbr></ *** glibc detected *** double free or corruption (!prev): 0x080933b0 *** /usr/bin/git-clone: line 29: 10712 Aborted git-http-fetch -v -a -w "$tname" "$name" "$1/"

-Peter
Pavel Roskin· Jul 28, 2006, 07:08 UTC · re: Peter Baumann · lore

Re: Java GIT/Eclipse GIT version 0.1.1

Quoting Peter Baumann <Peter.B.Baumann@stud.informatik.uni-erlangen.de>:
Show 12 quoted lines
> On 2006-07-28, Shawn Pearce <spearce@spearce.org> wrote:
> > My Java GIT library and Eclipse GIT team provider is now at a point
> > where it may be partially useful to someone else who is also trying
> > to write something which interacts with GIT.  Or who might also
> > be interested in seeing a pure-Java Eclipse team provider for GIT.
> >
> > So I've posted my repository (currently ~200 KB) on my website:
> >
> >   http://www.spearce.org/projects/scm/egit.git
> >
>
> Doesn't work for me.
Neither does it for me:

$ git clone http://www.spearce.org/projects/scm/egit.git error: File ac32c7cc2f7cf87a1ed80d0cdfca2af2a0385bb2 (http://www.spearce.org/projects/scm/egit.git/objects/ac/32c7cc2f7cf87a1ed80d0cdfca2af2a0385bb2) corrupt Getting pack list for http://www.spearce.org/projects/scm/egit.git/ error: XML error: not well-formed (invalid token)

> *** glibc detected *** double free or corruption (!prev): 0x080933b0 ***
> /usr/bin/git-clone: line 29: 10712 Aborted                 git-http-fetch -v
> -a -w "$tname" "$name" "$1/"
I'm not getting that.  I hope you are just using an obsolete version of git.

-- Regards, Pavel Roskin

Peter Baumann· Jul 28, 2006, 07:23 UTC · re: Pavel Roskin · lore

Re: Java GIT/Eclipse GIT version 0.1.1

On 2006-07-28, Pavel Roskin <proski@gnu.org> wrote:
Show 29 quoted lines
> Quoting Peter Baumann <Peter.B.Baumann@stud.informatik.uni-erlangen.de>:
>
>> On 2006-07-28, Shawn Pearce <spearce@spearce.org> wrote:
>> > My Java GIT library and Eclipse GIT team provider is now at a point
>> > where it may be partially useful to someone else who is also trying
>> > to write something which interacts with GIT.  Or who might also
>> > be interested in seeing a pure-Java Eclipse team provider for GIT.
>> >
>> > So I've posted my repository (currently ~200 KB) on my website:
>> >
>> >   http://www.spearce.org/projects/scm/egit.git
>> >
>>
>> Doesn't work for me.
>
> Neither does it for me:
>
> $ git clone http://www.spearce.org/projects/scm/egit.git
> error: File ac32c7cc2f7cf87a1ed80d0cdfca2af2a0385bb2
> (http://www.spearce.org/projects/scm/egit.git/objects/ac/32c7cc2f7cf87a1ed80d0cdfca2af2a0385bb2)
> corrupt
> Getting pack list for http://www.spearce.org/projects/scm/egit.git/
> error: XML error: not well-formed (invalid token)
>
>> *** glibc detected *** double free or corruption (!prev): 0x080933b0 ***
>> /usr/bin/git-clone: line 29: 10712 Aborted                 git-http-fetch -v
>> -a -w "$tname" "$name" "$1/"
>
> I'm not getting that.  I hope you are just using an obsolete version of git.
Not _that_ old, me thinks. I'm using the debian unstable version.

devil:~ dpkg -l |grep git-core ii git-core 1.4.1-1 content addressable filesystem

(Yes, I'am aware that this version has the timing bug on the server side, but I was just too lazy to compile git myself this time :-)

-Peter
Pavel Roskin· Jul 29, 2006, 02:10 UTC · re: Peter Baumann · lore

Re: Java GIT/Eclipse GIT version 0.1.1

On Fri, 2006-07-28 at 09:23 +0200, Peter Baumann wrote:
Show 7 quoted lines
> >> *** glibc detected *** double free or corruption (!prev): 0x080933b0 ***
> >> /usr/bin/git-clone: line 29: 10712 Aborted                 git-http-fetch -v
> >> -a -w "$tname" "$name" "$1/"
> >
> > I'm not getting that.  I hope you are just using an obsolete version of git.
> 
> Not _that_ old, me thinks. I'm using the debian unstable version.

I tried to reproduce it but couldn't. I tried valgrind (3.2.0 and current) on two architectures, I tried _FORTIFY_SOURCE=2 to no avail - it just won't crash or report anything suspicious. It's the current master branch of git.

So, it's up to you to debug it.
-- 
Regards,
Pavel Roskin
Peter Baumann· Jul 29, 2006, 16:46 UTC · re: Pavel Roskin · lore

Re: Java GIT/Eclipse GIT version 0.1.1

On 2006-07-29, Pavel Roskin <proski@gnu.org> wrote:
Show 16 quoted lines
> On Fri, 2006-07-28 at 09:23 +0200, Peter Baumann wrote:
>> >> *** glibc detected *** double free or corruption (!prev): 0x080933b0 ***
>> >> /usr/bin/git-clone: line 29: 10712 Aborted                 git-http-fetch -v
>> >> -a -w "$tname" "$name" "$1/"
>> >
>> > I'm not getting that.  I hope you are just using an obsolete version of git.
>> 
>> Not _that_ old, me thinks. I'm using the debian unstable version.
>
> I tried to reproduce it but couldn't.  I tried valgrind (3.2.0 and
> current) on two architectures, I tried _FORTIFY_SOURCE=2 to no avail -
> it just won't crash or report anything suspicious.  It's the current
> master branch of git.
>
> So, it's up to you to debug it.
>
Strange. Running git-clone now works.
devil:~ cd src; git clone http://www.spearce.org/projects/scm/egit.git
error: File ac32c7cc2f7cf87a1ed80d0cdfca2af2a0385bb2
(http://www.spearce.org/projects/scm/egit.git/objects/ac/32c7cc2f7cf87a1ed80d0cdfca2af2a0385bb2)
corrupt
Getting pack list for http://www.spearce.org/projects/scm/egit.git/
error: XML error: not well-formed (invalid token)
Getting index for pack 052a98c5ca30068b8ecda3302198174e4588bab1
Getting pack 052a98c5ca30068b8ecda3302198174e4588bab1
 which contains ac32c7cc2f7cf87a1ed80d0cdfca2af2a0385bb2
walk ac32c7cc2f7cf87a1ed80d0cdfca2af2a0385bb2
[... lots of correct looking walk's ...]

walk c1f287cb19b9910af19756cf29c08b1fda75da8c Some loose object were found to be corrupt, but they might be just a false '404 Not Found' error message sent with incorrect HTTP status code. Suggest running git fsck-objects. got eab86de8ac23e2e77878835007724146fdd83796

And git-fsck-objects --full doesn't barf, so it should be ok. Could it be related that I am not using a proxy today (as last time)?

-Peter
Shawn Pearce· Jul 29, 2006, 03:32 UTC · re: Pavel Roskin · lore

Re: Java GIT/Eclipse GIT version 0.1.1

Pavel Roskin <proski@gnu.org> wrote:
Show 23 quoted lines
> Quoting Peter Baumann <Peter.B.Baumann@stud.informatik.uni-erlangen.de>:
> 
> > On 2006-07-28, Shawn Pearce <spearce@spearce.org> wrote:
> > > My Java GIT library and Eclipse GIT team provider is now at a point
> > > where it may be partially useful to someone else who is also trying
> > > to write something which interacts with GIT.  Or who might also
> > > be interested in seeing a pure-Java Eclipse team provider for GIT.
> > >
> > > So I've posted my repository (currently ~200 KB) on my website:
> > >
> > >   http://www.spearce.org/projects/scm/egit.git
> > >
> >
> > Doesn't work for me.
> 
> Neither does it for me:
> 
> $ git clone http://www.spearce.org/projects/scm/egit.git
> error: File ac32c7cc2f7cf87a1ed80d0cdfca2af2a0385bb2
> (http://www.spearce.org/projects/scm/egit.git/objects/ac/32c7cc2f7cf87a1ed80d0cdfca2af2a0385bb2)
> corrupt
> Getting pack list for http://www.spearce.org/projects/scm/egit.git/
> error: XML error: not well-formed (invalid token)

Hmm. My website is known to return 200 OK status codes on missing files with HTML pages rather than proper 404 Not Found. I guess I need to get that fixed.

I just compiled and installed `next` (1.4.2.rc1.g802da) and it can clone this repository just fine over HTTP, despite my broken server. So I'm not really sure what is going on.

I should look into fixing my server, but its low on my priority list.
-- 
Shawn.
Pavel Roskin· Jul 29, 2006, 03:55 UTC · re: Shawn Pearce · lore

Re: Java GIT/Eclipse GIT version 0.1.1

On Fri, 2006-07-28 at 23:32 -0400, Shawn Pearce wrote:
> Hmm.  My website is known to return 200 OK status codes on missing
> files with HTML pages rather than proper 404 Not Found.  I guess
> I need to get that fixed.

Maybe git-http-fetch could treat MIME type text/html like error 404? It's not like any valid file git requests can be in HTML format.

> I just compiled and installed `next` (1.4.2.rc1.g802da) and it can
> clone this repository just fine over HTTP, despite my broken server.
> So I'm not really sure what is going on.

Sorry, I was unclear. I can clone the repository, I was just concerned that something was missing from it.

-- 
Regards,
Pavel Roskin
Shawn Pearce· Jul 29, 2006, 04:08 UTC · re: Pavel Roskin · lore

Re: Java GIT/Eclipse GIT version 0.1.1

Pavel Roskin <proski@gnu.org> wrote:
Show 8 quoted lines
> On Fri, 2006-07-28 at 23:32 -0400, Shawn Pearce wrote:
> 
> > Hmm.  My website is known to return 200 OK status codes on missing
> > files with HTML pages rather than proper 404 Not Found.  I guess
> > I need to get that fixed.
> 
> Maybe git-http-fetch could treat MIME type text/html like error 404?
> It's not like any valid file git requests can be in HTML format.

This has been discussed to death on the list, mostly due to my pg repository causing the same error (its on the same server).

The solution turned out to be rather good in my opinion: if an object is corrupt we log it, and skip to pack downloading. At the end the bad object is logged and the user is encouraged to run git-fsck-objects to verify there's no corrupt objects or objects which are missing things they point at (e.g. ancestor commits or trees).

Of course the real solution here is for me to fix my server.  :-)
Show 6 quoted lines
> > I just compiled and installed `next` (1.4.2.rc1.g802da) and it can
> > clone this repository just fine over HTTP, despite my broken server.
> > So I'm not really sure what is going on.
> 
> Sorry, I was unclear.  I can clone the repository, I was just concerned
> that something was missing from it.

git-http-fetch recommends running git-fsck-objects to be sure, but yea, usually its complete even though you get the error.

-- 
Shawn.
Jakub Narebski· Jul 29, 2006, 10:15 UTC · re: Shawn Pearce · lore

Re: Java GIT/Eclipse GIT version 0.1.1

Shawn Pearce wrote:
Show 8 quoted lines
> My Java GIT library and Eclipse GIT team provider is now at a point
> where it may be partially useful to someone else who is also trying
> to write something which interacts with GIT.  Or who might also
> be interested in seeing a pure-Java Eclipse team provider for GIT.
> 
> So I've posted my repository (currently ~200 KB) on my website:
> 
>   http://www.spearce.org/projects/scm/egit.git
Could you also provide some webpage and/or gitweb for this project?
I have added some info about your work on GitWiki at
  http://git.or.cz/gitwiki/InterfacesFrontendsAndTools#Eclipse
Please review, correct errors, and expand information as needed.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Daniel Barkalow· Jul 30, 2006, 14:55 UTC · re: Shawn Pearce · lore

Re: Java GIT/Eclipse GIT version 0.1.1

On Fri, 28 Jul 2006, Shawn Pearce wrote:
> I would appreciate any and all input, feedback, etc. that anyone
> might have on this library or plugin.  Patches are of course
> certainly welcome.  :-)

I'm going to try to do a Servlet (+ my stuff) implementation of essentiall gitweb, with the idea that it could integrate with project management software (i.e., link completed tasks to the commit which completed them, regressions to the commit that broke things, fixes to the commit that fixed them, etc, with the UI for choosing values letting you browse the actual content and validating that the hash you give exists).

I don't think I need anything you don't already have, but I'll write documentation as I figure out what's going on, if you want that.

	-Daniel
*This .sig left intentionally blank*
Shawn Pearce· Jul 31, 2006, 04:22 UTC · re: Daniel Barkalow · lore

Re: Java GIT/Eclipse GIT version 0.1.1

Daniel Barkalow <barkalow@iabervon.org> wrote:
Show 15 quoted lines
> On Fri, 28 Jul 2006, Shawn Pearce wrote:
> 
> > I would appreciate any and all input, feedback, etc. that anyone
> > might have on this library or plugin.  Patches are of course
> > certainly welcome.  :-)
> 
> I'm going to try to do a Servlet (+ my stuff) implementation of essentiall 
> gitweb, with the idea that it could integrate with project management 
> software (i.e., link completed tasks to the commit which completed them, 
> regressions to the commit that broke things, fixes to the commit that 
> fixed them, etc, with the UI for choosing values letting you browse the 
> actual content and validating that the hash you give exists).
> 
> I don't think I need anything you don't already have, but I'll write 
> documentation as I figure out what's going on, if you want that.
Sure.  Any improvements would be welcome.  :-)

Please keep in mind that when I post the next update to the repository I'm going to switch the license to the LGPL.

Apparently the Apache License has issues with GPL (I didn't know this until just recently) and the GPL is definately incompatible with the Eclipse license (also just found this out).

-- 
Shawn.

← back to recent threads