From: "Shawn O. Pearce" <spearce@spearce.org>
To: Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Cc: git@vger.kernel.org
Subject: Re: [JGIT PATCH 05/11] Don't advertise HEAD from ReceivePack
Date: Tue, 21 Jul 2009 08:28:00 -0700 [thread overview]
Message-ID: <20090721152800.GQ11191@spearce.org> (raw)
In-Reply-To: <200907211722.09631.robin.rosenberg.lists@dewire.com>
Robin Rosenberg <robin.rosenberg.lists@dewire.com> wrote:
> l?rdag 11 juli 2009 22:19:20 skrev "Shawn O. Pearce" <spearce@spearce.org>:
> > diff --git a/org.spearce.jgit/src/org/spearce/jgit/transport/ReceivePack.java b/org.spearce.jgit/src/org/spearce/jgit/transport/ReceivePack.java
> > index fd8aa86..1c490af 100644
> > --- a/org.spearce.jgit/src/org/spearce/jgit/transport/ReceivePack.java
> > +++ b/org.spearce.jgit/src/org/spearce/jgit/transport/ReceivePack.java
> > @@ -509,8 +509,11 @@ private void sendAdvertisedRefs() throws IOException {
> > adv.advertiseCapability(CAPABILITY_REPORT_STATUS);
> > if (allowOfsDelta)
> > adv.advertiseCapability(CAPABILITY_OFS_DELTA);
> > - refs = db.getAllRefs();
> > + refs = new HashMap<String, Ref>(db.getAllRefs());
> > + final Ref head = refs.remove(Constants.HEAD);
> > adv.send(refs.values());
> > + if (head != null && head.getName() == head.getOrigName())
> > + adv.advertiseHave(head.getObjectId());
>
> This relies on an implicit guarantee that == works here. Would equals cost
> too much? Or perhaps we should document this guarantee as part of the
> interface.
Ouch, good point, .equals would be better here. Can you amend?
If its the only issue in the series just amend it to be .equals(),
if there are other things for me to fix I'll be happy to send an
updated patch.
--
Shawn.
prev parent reply other threads:[~2009-07-21 15:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-11 20:19 [JGIT PATCH 00/11] Repository instance caching Shawn O. Pearce
2009-07-11 20:19 ` [JGIT PATCH 01/11] Change Daemon to use concurrent collections for exported repositories Shawn O. Pearce
2009-07-11 20:19 ` [JGIT PATCH 02/11] Make Daemon's exportAll check not require synchronization Shawn O. Pearce
2009-07-11 20:19 ` [JGIT PATCH 03/11] Don't retry ".git" suffix in daemon if already tried Shawn O. Pearce
2009-07-11 20:19 ` [JGIT PATCH 04/11] Refactor ref advertisement code from server implementations Shawn O. Pearce
2009-07-11 20:19 ` [JGIT PATCH 05/11] Don't advertise HEAD from ReceivePack Shawn O. Pearce
2009-07-11 20:19 ` [JGIT PATCH 06/11] Add a use reference counter to Repository Shawn O. Pearce
2009-07-11 20:19 ` [JGIT PATCH 07/11] Introduce RepositoryCache to cache handles of Repository objects Shawn O. Pearce
2009-07-11 20:19 ` [JGIT PATCH 08/11] Change Daemon to use RepositoryCache Shawn O. Pearce
2009-07-11 20:19 ` [JGIT PATCH 09/11] Expose the Repository's ObjectDatabase object Shawn O. Pearce
2009-07-11 20:19 ` [JGIT PATCH 10/11] Use cached Repository instances when resolving alternates Shawn O. Pearce
2009-07-11 20:19 ` [JGIT PATCH 11/11] Send .have lines in ReceivePack for alternate repositories Shawn O. Pearce
2009-07-21 15:22 ` [JGIT PATCH 05/11] Don't advertise HEAD from ReceivePack Robin Rosenberg
2009-07-21 15:28 ` Shawn O. Pearce [this message]
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=20090721152800.GQ11191@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=robin.rosenberg.lists@dewire.com \
/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.