Re: [PATCH] git fetch one tag only

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 6, 2012 at 6:40 PM, cheng renquan <crquan@xxxxxxxxx> wrote:
>
> Someone maybe like me is working in the way of following one central
> git repository
> while sometimes need to fetch some code or tags from a 3rd git repo,
> but unfortunately the 3rd repo may contain a lot of tags not all I want
> to fetch to mess up my local repo, at this time I want to fetch only one tag
> from the 3rd repo, but the syntax of
>  `git fetch 3rd-repo the-tag-name`
>
> really fetched the code of the-tag-name from 3rd-repo, but forgot the
> tag itself;


The subject of "forgot" in that sentence is you, not "git fetch".
You told "git fetch" to grab it but not store it locally in your
refs/tags namespace.

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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]