From: Junio C Hamano <junkio@cox.net>
To: Tony Luck <tony.luck@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git fetch --tags doesn't quite do what I expect
Date: Fri, 18 Nov 2005 12:06:29 -0800 [thread overview]
Message-ID: <7v1x1diuuy.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <12c511ca0511181114jf4ca3c0p195a128fa541b8f2@mail.gmail.com> (Tony Luck's message of "Fri, 18 Nov 2005 11:14:16 -0800")
Tony Luck <tony.luck@gmail.com> writes:
> Is this intended behaivour? If so, the "--tags" entry on the
> git-fetch(1) man page needs a little extra text to say that
> --tags limits the fetch to only commits reachable from the
> tags.
I think both Linus (who did the initial implementation of "git
fetch --tags") and I are in "tags do not matter until you care"
camp, and the expected usage pattern is that you frequently do
"git fetch" or "git pull", but "git fetch --tags" is done only
every once in a while, just to give you known anchors to compare
against or specify a known bottom for log, whatchanged and
friends. The branch heads are necessary for your day to day
work, the tags are less essential. That is what I mean by "tags
do not matter until you care".
A tag usually points at somewhere in the commit chain leading to
branch heads [*1*], and if your branch heads are up to date,
"git fetch --tags" does not download anything other than the
tags themselves, finds the commits they point at are already
available and complete, and stops there.
Now it happens that "git fetch --tags" slurps commits you do not
yet have _if_ your branch heads are behind, because git barebone
Porcelain is designed to keep your object database complete
(i.e. it does not just fetch and store tags under refs/tags/
without making sure you have everything they connect to). What
you saw that is a side effect of the above design assumption.
I am not good at documenting things, so I'd appreciate if
somebody paraphrased the above and send it back to me in a patch
form to update the document ;-).
[Footnote]
*1* This is not necessarily true; tags can point at anything,
and indeed v1.0rc3 tag point at another tag and junio-gpg-tag
points at a freestanding blob. Even a tag pointing at a commit,
as Daniel suggested in
<Pine.LNX.4.64.0511041745480.25300@iabervon.org>
I could do the "pu" branch as a tag without exposing the actual
branch. Then that tag would point at a chain of commits not
connected to any branch head.
next prev parent reply other threads:[~2005-11-18 20:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-18 19:14 git fetch --tags doesn't quite do what I expect Tony Luck
2005-11-18 20:06 ` Junio C Hamano [this message]
2005-11-18 22:04 ` Luck, Tony
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=7v1x1diuuy.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=tony.luck@gmail.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