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

Re: [PATCH JGit 2/5] Create abstract method on ObjectDatabase for accessing the list of local pack files.

From
Michael Gaffney <mr.gaffo@gmail.com>
Date
Sep 21, 2009, 19:51 UTC
Message-ID
<4AB7D950.9000600@gmail.com>
In-Reply-To
<20090921194035.GM14660@spearce.org>
Shawn O. Pearce wrote:
> Why not allow the ObjectDirectory code to create the directory
> before copying the pack into it?

Good point, this was one of the first tests I did before I got to that part of ObjectDirectory. Will fix.

> Don't you mean the list of packs this object database contains?
> An object database may not be a git repository.  Though yes, the
> common case is that it is a repository.

What's the difference in terminology? Not aruging, just wanting to know what we're calling a repo and what we're not so that I use it correctly. Will fix.

Show 5 quoted lines
>> +	public abstract List<PackFile> listLocalPacks();
> 
> I think you should define this to be an unmodifiable list, not just
> any list.  Its sad that the Java type system didn't support this
> idea back when they added the new collections APIs.

Should it be a collection as well instead of a list; what would you specifically suggest?

> Instead of copying, why not return an unmodifiableList wrapped
> around the array?  PackList will never modify its internal array.
Same as above
-Mike
Previous: Shawn O. PearceNext: Shawn O. Pearce
Message 11 of 12 in “Adding update-server-info functionality try2”
  1. Adding update-server-info functionality try2mr.gaffo@gmail.com, Sep 16, 2009
  2. 1/5 adding tests for ObjectDirectorymr.gaffo@gmail.com, Sep 16, 2009
  3. 2/5 Create abstract method on ObjectDatabase for accessing the list of local pack files.mr.gaffo@gmail.com, Sep 16, 2009
  4. 3/5 Implemented directory based info cache for objects/info/packs.mr.gaffo@gmail.com, Sep 16, 2009
  5. 4/5 Adding in a InfoDatabase like ObjectDatabase and and implementation based upon a directory.mr.gaffo@gmail.com, Sep 16, 2009
  6. 5/5 added tests for the file based info cache update and made passmr.gaffo@gmail.com, Sep 16, 2009
  7. Shawn O. PearceOct 8, 2009
  8. Shawn O. PearceOct 8, 2009
  9. Shawn O. PearceOct 8, 2009
  10. Shawn O. PearceSep 21, 2009
  11. Michael GaffneySep 21, 2009
  12. Shawn O. PearceSep 21, 2009

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.