git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git fetch one tag only

From
cheng renquan <crquan@gmail.com>
Date
Jun 7, 2012, 16:11 UTC
Message-ID
<CAH5vBdKHOg=PTsFPgcsd3iNEuTTY_dD2gPNXkmzjRmE8NpBrXw@mail.gmail.com>
In-Reply-To
<CAH5vBdKXaOV3hC0E0s=j3Hc2jZ9otxhXLMhCCKiU4=Rn4Y4COA@mail.gmail.com>
On Wed, Jun 6, 2012 at 10:47 PM, cheng renquan <crquan@gmail.com> wrote:
Show 5 quoted lines
> ok, got it:
>
> $ git fetch -v --no-tags linux-stable tag v3.4.1
> From git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable
>  = [up to date]      v3.4.1     -> v3.4.1
Here I still think the logic is wrong:

$ git fetch linux-stable tag fatal: You need to specify a tag name.

$ git fetch linux-stable tag v3.4.1 [this would actually fetch all tags]

from `git help fetch`:
           Some short-cut notations are also supported.
           ·    tag <tag> means the same as
refs/tags/<tag>:refs/tags/<tag>; it requests fetching everything up to
the given tag.

Here the documentation is saying "everything up to the given tag.", but other tags can never be all belonging to that path, for above example, in the path up to given tag v3.4.1, I'm sure other tags like v3.3.1 are not in the path;

So the `git fetch linux-stable tag v3.4.1` fetched other tags is a WRONG behavior, and why can't we fix that by disabling auto-following automatically if use tag syntax? Why to the user "--no-tags" is explicitly required?

Previous: cheng renquanNext: Junio C Hamano
Message 6 of 9 in “git fetch one tag only”
  1. git fetch one tag onlycheng renquan, Jun 7, 2012
  2. Junio C HamanoJun 7, 2012
  3. cheng renquanJun 7, 2012
  4. Junio C HamanoJun 7, 2012
  5. cheng renquanJun 7, 2012
  6. cheng renquanJun 7, 2012
  7. Junio C HamanoJun 7, 2012
  8. cheng renquanJun 8, 2012
  9. Junio C HamanoJun 8, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.