{"thread":{"id":"20358","subject":"Using both JGit and C Git","startedAt":"2009-08-03T18:05:21Z","lastAt":"2009-08-10T15:12:55Z","messageCount":2,"participants":["Semen Vadishev","Shawn O. Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"119421","messageId":"4A7726E1.2020501@gmail.com","threadId":"20358","inReplyTo":null,"subject":"Using both JGit and C Git","fromName":"Semen Vadishev","fromEmail":"semen.vadishev@gmail.com","sentAt":"2009-08-03T18:05:21Z","receivedAt":"2009-08-03T18:05:21Z","isPatch":false,"sender":{"key":"semen.vadishev@gmail.com","avatar":null},"body":"Hello everyone,\n\nI'm working on git client written in Java. Now the application uses both\nimplementations but our team is interested in switching to JGit\ncompletely some day. We consider that for the first version all\nread-only operations should be implemented with JGit and read-write\nfunctionality should use exec calls to git executable. We would keep\nthat approach until we have even the smallest suspect that pure Java\nimplementation could corrupt repository somehow. Also we have a number\nof read-write operations implemented with JGit and we will use them\ninternally to collect more experience and to see if any problems will\nappear.\n\nDoes anyone here already have any experience with using both JGit and C\nGit together. Is there any kind of test suites which allow to check\nJGit's behavior on different platforms comparing with native git. Is\nthere any known issues/workarounds? Any feedback is much appreciated.\n\nI've noticed that such a question was raised here, but the answers are\nprobably out of date now.\n\nThanks in advance!\n-- Semyon.\n"},{"id":"120163","messageId":"20090810151255.GP1033@spearce.org","threadId":"20358","inReplyTo":"4A7726E1.2020501@gmail.com","subject":"Re: Using both JGit and C Git","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-08-10T15:12:55Z","receivedAt":"2009-08-10T15:12:55Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Semen Vadishev <Semen.Vadishev@gmail.com> wrote:\n> I'm working on git client written in Java. Now the application uses both\n> implementations but our team is interested in switching to JGit\n> completely some day. We consider that for the first version all\n> read-only operations should be implemented with JGit and read-write\n> functionality should use exec calls to git executable. We would keep\n> that approach until we have even the smallest suspect that pure Java\n> implementation could corrupt repository somehow. Also we have a number\n> of read-write operations implemented with JGit and we will use them\n> internally to collect more experience and to see if any problems will\n> appear.\n> \n> Does anyone here already have any experience with using both JGit and C\n> Git together. Is there any kind of test suites which allow to check\n> JGit's behavior on different platforms comparing with native git. Is\n> there any known issues/workarounds? Any feedback is much appreciated.\n> \n> I've noticed that such a question was raised here, but the answers are\n> probably out of date now.\n\nThere are some tests in the JGit test suite that validate JGit\nagainst C Git output to ensure the data is the same.  For example\nwe have created certain content with C Git, checked a copy of the\npack file into the JGit repository, then create the same content\nin JGit and validate that the data is the same.  But this sort of\ntest is difficult because of potential unimportant variations in\nthe zlib library.  The compressed output can safely differ, when\nrunning the output through the inflate method the original content\nis still restored.  So we tend not to rely on it that much.\n\n\nI can say that JGit completely powers Gerrit Code Review[1], and\nthat Gerrit Code Review is in use at many different sites as a\nproduction server, relied upon by thousands for their daily work.\nAs a case in point, Gerrit Code Review powers the Android Open\nSource Project... and also the Android related teams for many device\nmanufacturers who are building devices running that operating system.\nIt also powers the servers used by the Google developers who work\non Android.\n\nGerrit Code Review completely runs the server side portion of Git,\nboth the git-upload-pack and git-receive-pack, in a pure Java SSHD.\nIts the only interface the teams have to their repository... and\nit does it quite nicely.  The users don't know the difference,\nit just works.\n\nSo, in my humble opinion, as a server technology, JGit is quite\nstable and works well.  It doesn't perform as well as C Git does,\nespecially under high user loads, but we aren't serving volume here\nas a public read-only mirror, we are supporting a smaller group.\n\n\n[1] http://code.google.com/p/gerrit/\n\n-- \nShawn.\n"}]}