git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Jens Lehmann <Jens.Lehmann@web.de>
Cc: Marc Branchaud <marcnarc@xiplink.com>, git@vger.kernel.org
Subject: Re: [PATCH] fetch: Only call a new ref a "branch" if it's under refs/heads/.
Date: Fri, 13 Apr 2012 03:04:23 -0400	[thread overview]
Message-ID: <20120413070423.GA16292@sigill.intra.peff.net> (raw)
In-Reply-To: <20120412210542.GD21018@sigill.intra.peff.net>

On Thu, Apr 12, 2012 at 05:05:42PM -0400, Jeff King wrote:

> > Am 12.04.2012 22:36, schrieb Marc Branchaud:
> > > I assumed it was an optimization of some sort -- that since tags are normally
> > > only fetched when they're part of a requested branch's history (right?),
> > > there was no point in doing submodule recursion on the fetched tags since
> > > those tagged tree-ishes had already been submodule-recursed.
> > 
> > If that is the case the patch I just sent is pointless, but adding a comment
> > there explaining that would be a good thing ;-)
> 
> That is often the case, but not always (I might explicitly fetch a tag,
> or have refs/tags/ in my refspec). So I think you want to handle both to
> cover all cases. I haven't looked at the submodule recursion code, but I
> would hope that it would eliminate duplicates (so if I get a branch and
> a tag that is on the branch, we would look at the commit in question
> only once).

OK, I checked. Yes, we handle this just fine. After my 6859de4, we
collect the ref tips before and after the fetch and run only a single
rev-list. So processing the tags will result in just an extra
interesting commit, which was either:

  1. accessible by another fetched branch, in which case it was going to
     be processed as interesting anyway

  2. not accessible, in which case we have fixed a bug. :)

So I think we should check all incoming refs, including tags.

-Peff

  reply	other threads:[~2012-04-13  7:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11 14:29 [PATCH] fetch: Only call a new ref a "branch" if it's under refs/heads/ marcnarc
2012-04-12  5:52 ` Jeff King
2012-04-12 20:15   ` Jens Lehmann
2012-04-12 20:36     ` Marc Branchaud
2012-04-12 20:42       ` Jens Lehmann
2012-04-12 21:05         ` Jeff King
2012-04-13  7:04           ` Jeff King [this message]
2012-04-13 16:25             ` [PATCH] submodules: recursive fetch also checks new tags for submodule commits Jens Lehmann

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=20120413070423.GA16292@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=marcnarc@xiplink.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).