git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Any overview available on jgit codebase?

From
Shawn O. Pearce <spearce@spearce.org>
Date
Nov 15, 2008, 23:15 UTC
Message-ID
<20081115231537.GD2932@spearce.org>
In-Reply-To
<491F2F5E.20206@wellfleetsoftware.com>
Farrukh Najmi <farrukh@wellfleetsoftware.com> 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.

-- 
Shawn.
Previous: Farrukh NajmiNext: Farrukh Najmi
Message 7 of 8 in “Re: Any plans to support JTA and XA in jgit?”
  1. Robin RosenbergNov 13, 2008
  2. Farrukh NajmiNov 13, 2008
  3. Robin RosenbergNov 13, 2008
  4. Kyle MoffettNov 14, 2008
  5. Farrukh NajmiNov 14, 2008
  6. Any overview available on jgit codebase?Farrukh Najmi, Nov 15, 2008
  7. Shawn O. PearceNov 15, 2008
  8. Farrukh NajmiNov 16, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.