All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Gaffney <mr.gaffo@gmail.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH JGit 2/5] Create abstract method on ObjectDatabase for accessing the list of local pack files.
Date: Mon, 21 Sep 2009 14:51:44 -0500	[thread overview]
Message-ID: <4AB7D950.9000600@gmail.com> (raw)
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.

>> +	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

  reply	other threads:[~2009-09-21 19:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-16  0:48 [PATCH JGit] Adding update-server-info functionality try2 mr.gaffo
2009-09-16  0:48 ` [PATCH JGit 1/5] adding tests for ObjectDirectory mr.gaffo
2009-09-16  0:48   ` [PATCH JGit 2/5] Create abstract method on ObjectDatabase for accessing the list of local pack files mr.gaffo
2009-09-16  0:48     ` [PATCH JGit 3/5] Implemented directory based info cache for objects/info/packs mr.gaffo
2009-09-16  0:48       ` [PATCH JGit 4/5] Adding in a InfoDatabase like ObjectDatabase and and implementation based upon a directory mr.gaffo
2009-09-16  0:48         ` [PATCH JGit 5/5] added tests for the file based info cache update and made pass mr.gaffo
2009-10-08 17:12           ` Shawn O. Pearce
2009-10-08 17:05         ` [PATCH JGit 4/5] Adding in a InfoDatabase like ObjectDatabase and and implementation based upon a directory Shawn O. Pearce
2009-10-08 17:00       ` [PATCH JGit 3/5] Implemented directory based info cache for objects/info/packs Shawn O. Pearce
2009-09-21 19:40     ` [PATCH JGit 2/5] Create abstract method on ObjectDatabase for accessing the list of local pack files Shawn O. Pearce
2009-09-21 19:51       ` Michael Gaffney [this message]
2009-09-21 19:30   ` [PATCH JGit 1/5] adding tests for ObjectDirectory Shawn O. Pearce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AB7D950.9000600@gmail.com \
    --to=mr.gaffo@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.