git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Brandon Casey <casey@nrlssc.navy.mil>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: fetch <repo> <branch>:<branch> fetches tags?
Date: Mon, 28 Jan 2008 23:19:29 -0500	[thread overview]
Message-ID: <20080129041928.GL24004@spearce.org> (raw)
In-Reply-To: <7v3ashs5yg.fsf@gitster.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> wrote:
> Brandon Casey <casey@nrlssc.navy.mil> writes:
> >
> > But, I did not expect these to fetch tags:
> >
> >    git fetch <repo> <branch>:<branch>
> >    git pull <repo> <branch>:<branch>
> 
> Sigh... that matches my expectation.
> 
> Did we break it when we overhauled "git fetch", or was this an
> independent "improvement" that happened long before that?

I think during the git-fetch builtin marathon this got implemented,
but probably as a feature masquerading as a bug fix and we didn't
notice the regression.

The theory behind the expectation here is if we are fetching the
object to a tracking ref then we probably want to watch it in
the future.  If we want to watch it and tag following was allowed,
and we are missing a tag, we should follow the tag if we have the
object graph under the tag complete.

Now what should:

	git pull <repo> <branch1>:<branch1> <branch2>

do, especially if <branch2> is referring to an object that you don't
already have, that object also isn't reachable through <branch1>,
but <branch2>^0 is the target of a tag <tag2> that you don't have?
Should we get the tag anyway?

Personally I'd expect us to skip the tag pointing at <branch2>^0,
based upon my description above, but I have a feeling we'd follow
it anyway, as tag following was enabled and at least one item in
the fetchspec provided asked for storage to a tracking ref and we
have <tag2>^{} complete.


Of course even if we didn't follow that tag right away a future:

	git fetch <repo> <branch1>:<branch1>

might cause us to get the tag anyway, as <branch2>^0 is now reachable
through HEAD, due to the implicit git-merge we ran above.  ;-)

-- 
Shawn.

  reply	other threads:[~2008-01-29  4:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-29  2:33 fetch <repo> <branch>:<branch> fetches tags? Brandon Casey
2008-01-29  2:41 ` Johannes Schindelin
2008-01-29  3:09   ` Brandon Casey
2008-01-29  2:47 ` Junio C Hamano
2008-01-29  4:19   ` Shawn O. Pearce [this message]
2008-01-29  5:26   ` Junio C Hamano
2008-01-29  8:46     ` Brandon Casey
2008-01-29  8:54       ` Junio C Hamano
2008-01-29 17:08         ` Brandon Casey

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=20080129041928.GL24004@spearce.org \
    --to=spearce@spearce.org \
    --cc=casey@nrlssc.navy.mil \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).