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

Re: Trouble with cat-file on tags

From
Sebastian Schuberth <sschuberth@gmail.com>
Date
Apr 1, 2016, 09:32 UTC
Message-ID
<ndlf7q$ghe$1@ger.gmane.org>
In-Reply-To
<ndlesh$dj1$1@ger.gmane.org>
On 4/1/2016 11:26, Sebastian Schuberth wrote:
Show 14 quoted lines
> ---8<---
> $ git tag test-tag
>
> $ git tag -l
> test-tag
> v0.0.3
> v0.0.4
> v0.1.0
> v0.1.1
> v0.1.2
>
> $ git cat-file tag refs/tags/test-tag
> fatal: git cat-file refs/tags/test-tag: bad file
> ---8<---

Alright, I just found out why that is: Lighweight tags are not stored as Git objects. As soon as I make it an annoted tag by specifying a message, "cat-file tag" do esnot display a fatal error anymore.

However, I still get information about the commit oject iintsead of the tag object. Is this expected?

Regards, Sebastian

Previous: Sebastian SchuberthNext: Sebastian Schuberth
Message 2 of 4 in “Trouble with cat-file on tags”
  1. Sebastian SchuberthApr 1, 2016
  2. Sebastian SchuberthApr 1, 2016
  3. Sebastian SchuberthApr 1, 2016
  4. Jeff KingApr 1, 2016

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.