From: Junio C Hamano <gitster@pobox.com>
To: Rico Secada <coolzone@it.dk>
Cc: git@vger.kernel.org
Subject: Re: Git pull doesn't get the tags
Date: Fri, 22 Oct 2010 15:25:52 -0700 [thread overview]
Message-ID: <7vy69pkgpb.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20101022142308.f275aefe.coolzone@it.dk> (Rico Secada's message of "Fri\, 22 Oct 2010 14\:23\:08 +0200")
Rico Secada <coolzone@it.dk> writes:
> On Fri, 22 Oct 2010 11:04:32 +0200
> Mathias Lafeldt <misfire@debugon.org> wrote:
>
>> From git-pull's manpage:
>>
>> -t
>> --tags
>> Most of the tags are fetched automatically as branch
>> heads are downloaded, but tags that do not point at
>> objects reachable from the branch heads that are being
>> tracked will not be fetched by this mechanism. This
>> flag lets all tags and their associated objects be
>> downloaded. [...]
[jc: please do not top post, because people tend to read from top to
bottom not the other way around]
> I managed to overlook the info from the man page, sorry.
>
> But what does "but tags that do not point at objects reachable from the
> branch heads that are being tracked will not be fetched by this
> mechanism" mean?
The above passage in the manual page may be stated rather poorly.
When "git fetch" is run, unless told otherwise by an explicit --no-tags,
it automatically fetches tags that point at new commits on branches you
fetch. For example, I just tagged v1.7.3.2 last night, so if you fetch
from me to get 'maint', 'master' or other integration branches of mine
that includes 8a90438 (Git 1.7.3.2, 2010-10-21), "git fetch" would also
copy v1.7.3.2 tag from me to your repository.
In the above example, 'maint', 'master', etc. are the branch heads that
are being tracked (i.e. you will copy them to the refs/remotes/origin
hierarchy in your repository) and v1.7.3.2 is a tag that does point at an
object 8a90438 reachable from these branch heads. So you will get the tag
without giving the --tags option from the command line.
If you were fetching only 'html' or 'man' branches from me, on the other
hand, you would not have gotten v1.7.3.2 tag, as they are separate
histories and that particular tag does not live in their ancestry.
Also tags that point at non-commits (e.g. in git.git, junio-gpg-pub and
spearce-gpg-pub are pointing at blob objects, and v2.6.11 and v2.6.11-tree
tags in the kernel repository are pointing at tree objects) will not be
fetched automatically either. You would need to explicitly ask for them
if you want them by either (1) find them via ls-remote and name them on
the command line, or (2) use --tags option
next prev parent reply other threads:[~2010-10-22 22:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-22 3:37 Git pull doesn't get the tags Rico Secada
2010-10-22 9:04 ` Mathias Lafeldt
2010-10-22 12:23 ` Rico Secada
2010-10-22 22:25 ` Junio C Hamano [this message]
2010-10-23 16:34 ` Rico Secada
2010-10-22 21:33 ` Junio C Hamano
2010-11-03 20:55 ` [PATCH] pull: Remove --tags option from manpage 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=7vy69pkgpb.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=coolzone@it.dk \
--cc=git@vger.kernel.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 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).