From: Junio C Hamano <gitster@pobox.com>
To: cheng renquan <crquan@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git fetch one tag only
Date: Wed, 06 Jun 2012 22:33:30 -0700 [thread overview]
Message-ID: <7vpq9bk7o5.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CAH5vBdKPH_-cn=r-zxQKCOi5PB5D6vuSXrZxPeZJ+HYg-K9Yqw@mail.gmail.com> (cheng renquan's message of "Wed, 6 Jun 2012 22:17:46 -0700")
cheng renquan <crquan@gmail.com> writes:
>> There is a convenience short-hand "tag <tagname>", i.e.
>>
>> git fetch 3rd-repo tag the-tag-name
>>
>> that is equivalent to
>>
>> git fetch 3rd-repo refs/tags/the-tag-name:refs/tags/the-tag-name
>>
>> So I do not think your patch is necessary for your use case, and
>> obviously it will break other people's use case where they just
>> want to fetch (and inspect what is left in FETCH_HEAD) but do not
>> want to store.
>
> No, I tried what you said but it doesn't work as expected:
> ...
> [linus-git] $ git fetch -v --dry-run linux-stable tag v3.4.1 |& head
> From git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable
> = [up to date] v3.4.1 -> v3.4.1
> * [new tag] latest -> latest
> * [new tag] v2.6.12.1 -> v2.6.12.1
> * [new tag] v2.6.12.2 -> v2.6.12.2
> [...]
> maybe I'd better to fix that?
Ahh, that is auto-following of tags. Read up on that in "git fetch"
manual page, and there is an option to decline auto-following also
described.
The (current) rule is to grab all tags that reference commits you
are fetching *IF* you are storing any refs resulting from the fetch
in your refs/ namespace, and "tag v3.4.1" obviously asks for storing
that tag at refs/tags/v3.4.1 in your repository, so it is expected
that the auto-following kicks in.
It is a separate matter if we should add some special case to further
reduce the cases where auto-following happens. I personally do not
think any change is needed.
next prev parent reply other threads:[~2012-06-07 5:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-07 1:40 [PATCH] git fetch one tag only cheng renquan
2012-06-07 4:37 ` Junio C Hamano
2012-06-07 5:17 ` cheng renquan
2012-06-07 5:33 ` Junio C Hamano [this message]
2012-06-07 5:47 ` cheng renquan
2012-06-07 16:11 ` cheng renquan
2012-06-07 17:08 ` Junio C Hamano
2012-06-08 21:46 ` cheng renquan
2012-06-08 22:22 ` Junio C Hamano
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=7vpq9bk7o5.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=crquan@gmail.com \
--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