All of lore.kernel.org
 help / color / mirror / Atom feed
* Git pull doesn't get the tags
@ 2010-10-22  3:37 Rico Secada
  2010-10-22  9:04 ` Mathias Lafeldt
  0 siblings, 1 reply; 7+ messages in thread
From: Rico Secada @ 2010-10-22  3:37 UTC (permalink / raw)
  To: git

Hi.

I am working on a repo on my desktop and I got a clone on my laptop.
I needed to pull the new stuff from my desktop unto my laptop, and I
noticed that tags doesn't get pulled.

The laptop access the desktop using NFS and I am using "git pull
NFS_SOURCE".

The repos are identical except that a few files has been updated and a
new tag has been added.

Why doesn't pull get the tag?

Best regards.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Git pull doesn't get the tags
  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 21:33   ` Junio C Hamano
  0 siblings, 2 replies; 7+ messages in thread
From: Mathias Lafeldt @ 2010-10-22  9:04 UTC (permalink / raw)
  To: Rico Secada; +Cc: git

On 10/22/2010 05:37 AM, Rico Secada wrote:
> Hi.
> 
> I am working on a repo on my desktop and I got a clone on my laptop.
> I needed to pull the new stuff from my desktop unto my laptop, and I
> noticed that tags doesn't get pulled.
> 
> The laptop access the desktop using NFS and I am using "git pull
> NFS_SOURCE".
> 
> The repos are identical except that a few files has been updated and a
> new tag has been added.
> 
> Why doesn't pull get the tag?
> 
> Best regards.

Try git pull --tags.

>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. [...]

-Mathias

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Git pull doesn't get the tags
  2010-10-22  9:04 ` Mathias Lafeldt
@ 2010-10-22 12:23   ` Rico Secada
  2010-10-22 22:25     ` Junio C Hamano
  2010-10-22 21:33   ` Junio C Hamano
  1 sibling, 1 reply; 7+ messages in thread
From: Rico Secada @ 2010-10-22 12:23 UTC (permalink / raw)
  To: git

On Fri, 22 Oct 2010 11:04:32 +0200
Mathias Lafeldt <misfire@debugon.org> wrote:

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?

When is an object not reachable from the branch head? In the repo only
the master branch exist, and one repo is cloned from the other.

> On 10/22/2010 05:37 AM, Rico Secada wrote:
> > Hi.
> > 
> > I am working on a repo on my desktop and I got a clone on my laptop.
> > I needed to pull the new stuff from my desktop unto my laptop, and I
> > noticed that tags doesn't get pulled.
> > 
> > The laptop access the desktop using NFS and I am using "git pull
> > NFS_SOURCE".
> > 
> > The repos are identical except that a few files has been updated
> > and a new tag has been added.
> > 
> > Why doesn't pull get the tag?
> > 
> > Best regards.
> 
> Try git pull --tags.
> 
> 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. [...]
> 
> -Mathias
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Git pull doesn't get the tags
  2010-10-22  9:04 ` Mathias Lafeldt
  2010-10-22 12:23   ` Rico Secada
@ 2010-10-22 21:33   ` Junio C Hamano
  2010-11-03 20:55     ` [PATCH] pull: Remove --tags option from manpage Jens Lehmann
  1 sibling, 1 reply; 7+ messages in thread
From: Junio C Hamano @ 2010-10-22 21:33 UTC (permalink / raw)
  To: git; +Cc: Rico Secada, Mathias Lafeldt

Mathias Lafeldt <misfire@debugon.org> writes:

> Try git pull --tags.
>
> 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. [...]

Can somebody submit a patch to stop this part of "fetch-options.txt" from
getting included in "git pull" manpage please, by the way?

This is one of the options that are passed to the underlying "git fetch"
without sanitizing by "git pull".  "Fetch all tags and merge them" does
not make any sense as a request at the logical level, even though it might
be more convenient to type.

I do not recall offhand if we made sure the stuff fetched with --tags
request are marked as not-for-merge, and if we didn't that is certainly a
bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Git pull doesn't get the tags
  2010-10-22 12:23   ` Rico Secada
@ 2010-10-22 22:25     ` Junio C Hamano
  2010-10-23 16:34       ` Rico Secada
  0 siblings, 1 reply; 7+ messages in thread
From: Junio C Hamano @ 2010-10-22 22:25 UTC (permalink / raw)
  To: Rico Secada; +Cc: git

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Git pull doesn't get the tags
  2010-10-22 22:25     ` Junio C Hamano
@ 2010-10-23 16:34       ` Rico Secada
  0 siblings, 0 replies; 7+ messages in thread
From: Rico Secada @ 2010-10-23 16:34 UTC (permalink / raw)
  To: git

On Fri, 22 Oct 2010 15:25:52 -0700
Junio C Hamano <gitster@pobox.com> wrote:

> 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

A nice and meaningful explanation. Thanks for the details!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] pull: Remove --tags option from manpage
  2010-10-22 21:33   ` Junio C Hamano
@ 2010-11-03 20:55     ` Jens Lehmann
  0 siblings, 0 replies; 7+ messages in thread
From: Jens Lehmann @ 2010-11-03 20:55 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Rico Secada, Mathias Lafeldt

"Fetch all tags and merge them" does not make any sense as a request at
the logical level, even though it might be more convenient to type.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
---

Am 22.10.2010 23:33, schrieb Junio C Hamano:
> Mathias Lafeldt <misfire@debugon.org> writes:
>> 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. [...]
> 
> Can somebody submit a patch to stop this part of "fetch-options.txt" from
> getting included in "git pull" manpage please, by the way?

Maybe something like this?


 Documentation/fetch-options.txt |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
index 470ac31..5ce1e72 100644
--- a/Documentation/fetch-options.txt
+++ b/Documentation/fetch-options.txt
@@ -53,6 +53,7 @@ endif::git-pull[]
 	behavior for a remote may be specified with the remote.<name>.tagopt
 	setting. See linkgit:git-config[1].

+ifndef::git-pull[]
 -t::
 --tags::
 	Most of the tags are fetched automatically as branch
@@ -63,6 +64,7 @@ endif::git-pull[]
 	downloaded. The default behavior for a remote may be
 	specified with the remote.<name>.tagopt setting. See
 	linkgit:git-config[1].
+endif::git-pull[]

 -u::
 --update-head-ok::
-- 
1.7.3.2.213.g5fe186

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-11-03 20:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.