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

Re: Re* How to generate pull-request with info of signed tag

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 21, 2011, 18:39 UTC
Message-ID
<7vobv1hir1.fsf@alter.siamese.dyndns.org>
In-Reply-To
<87ipl9yik6.fsf@linux.vnet.ibm.com>
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> writes:
Show 7 quoted lines
> With an entry like below
>
> [remote "github"]
>         fetch = +refs/tags/*:refs/tags/origin/*
>         url = git://github.com/kvaneesh/QEMU.git
>
> when i do git fetch github for-anthony i get the below error

When you give refspecs from the command line like that, the default refspec remote.github.fetch will not be used and what you configure there is immaterial.

> [master@QEMU]$ git fetch github for-anthony
>>From git://github.com/kvaneesh/QEMU
>  * tag               for-anthony -> FETCH_HEAD
Sounds sane.

Does "git cat-file -t FETCH_HEAD" report "tag" (it should)? After doing that fetch and inspecting "git log -p ..FETCH_HEAD", you should be able to do "git merge FETCH_HEAD" and it should be like you did "git pull github for-anthony".

Show 7 quoted lines
> Also trying to do
>
> [master@QEMU]$ git fetch git://github.com/kvaneesh/QEMU.git  for-anthony:aneesh/for-anthony
> error: Trying to write non-commit object 12916047784615b7d8b879d9d39be6c1559e1b1b to branch refs/heads/aneesh/for-anthony
>>From git://github.com/kvaneesh/QEMU
>  ! [new branch]      for-anthony -> aneesh/for-anthony  (unable to update local ref)
>  * [new tag]         for-anthony -> for-anthony
Sounds sane, too.
> I understand that replacing the above with below works. But we should
> not be required to specify refs/tags there right ?
>
> [master@QEMU]$ git fetch git://github.com/kvaneesh/QEMU.git  refs/tags/for-anthony:refs/tags/aneesh/for-anthony

If the "for-anthony" name is ambiguous between branches and tags, then you must disambiguate. I am guessing that the unqualified LHS "for-anthony" is found in the branch namespace of the remote, and that is why RHS is qualified with the same refs/heads/ prefix to store it to the branch namespace.

On the other hand, if "for-anthony" name is unambiguous, then you may have found a bug. I cannot tell.

Previous: Aneesh Kumar K.V
Message 12 of 12 in “How to generate pull-request with info of signed tag”
  1. Aneesh Kumar K.VDec 16, 2011
  2. Junio C HamanoDec 16, 2011
  3. Re* How to generate pull-request with info of signed tagJunio C Hamano, Dec 16, 2011
  4. Aneesh Kumar K.VDec 17, 2011
  5. Junio C HamanoDec 17, 2011
  6. Aneesh Kumar K.VDec 19, 2011
  7. Junio C HamanoDec 19, 2011
  8. Junio C HamanoDec 19, 2011
  9. Aneesh Kumar K.VDec 21, 2011
  10. Junio C HamanoDec 21, 2011
  11. Aneesh Kumar K.VDec 21, 2011
  12. Junio C HamanoDec 21, 2011

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.