Re: fetch <repo> <branch>:<branch> fetches tags?

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: fetch <repo> <branch>:<branch> fetches tags?

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:08

Junio C Hamano [off-list ref] writes:
Brandon Casey [off-list ref] writes:
...
quoted
I expect these to _not_ fetch tags (and they don't):

   git fetch <repo> <branch>
   git pull <repo> <branch>

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?
Having said that, I do not particularly think the new behaviour
is bad per-se.  If you are storing what you fetched locally in
tracking branches, you are interested in their work enough to
want to auto-follow their tags.

It's just that the expectation you and I shared is the
documented behaviour everywhere, and we would need to document
the new behaviour.

Re: fetch <repo> <branch>:<branch> fetches tags?

From: Brandon Casey <hidden>
Date: 2016-06-15 22:44:08

Junio C Hamano <gitster <at> pobox.com> writes:
Junio C Hamano <gitster <at> pobox.com> writes:
quoted
Brandon Casey <casey <at> nrlssc.navy.mil> writes:
...
quoted
I expect these to _not_ fetch tags (and they don't):

   git fetch <repo> <branch>
   git pull <repo> <branch>

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?
Having said that, I do not particularly think the new behaviour
is bad per-se.  If you are storing what you fetched locally in
tracking branches, you are interested in their work enough to
want to auto-follow their tags.
How is "tracking" defined? Is this a term that implies some configuration
to link a local branch to a remote branch? Or is any local branch created
from a remote branch considered "tracking"?

I thought that a tracking branch needed some setup like what the --track
option to git-branch or git-checkout would do. If setup is required, then
it implies some permanence to the branch and for the link between the
branch and the remote. In this case I agree you would want to auto-follow
tags.

-brandon
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help