From: Farrukh Najmi Date: Sun, 16 Nov 2008 00:21:10 GMT Subject: Re: Any overview available on jgit codebase? Message-ID: <491F6776.8060100@wellfleetsoftware.com> In-Reply-To: <20081115231537.GD2932@spearce.org> Shawn O. Pearce wrote: > Farrukh Najmi wrote: > >> At minimum could anyone tell me what packages and classes to look at in >> order to make changes to jgit so it uses a database instead of >> filesystem to references. >> > > See RefDatabase, created by Repository. You would want to replace > RefDatabase with your own implementation, which means abstracting > that class to be an abstract base class or an interface. > > RefUpdate and RefLogWriter are connected to RefDatabase, so you > would likely need to modify those too in order to make the change, > especially since RefUpdate is the "INSERT OR UPDATE OR DELETE" > logic. :) > > BTW, I want to do that RefDatabase abstraction anyway, because I'd > like to get an in-memory only version of RefDatabase, to make unit > testing easier. So abstracting this code may be useful beyond just > your desire to back Git with a JDBC-style database. > This is just what I was hoping for. Thanks Shawn. I will try and do this next week and ask for help as needed. Thank you. -- Regards, Farrukh Najmi Web: http://www.wellfleetsoftware.com