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

Re: [Bug] for-each-ref: %(object) and %(type) unimplemented

From
MMMikael Magnusson <mikachu@gmail.com>
Date
Jun 25, 2008, 20:36 UTC
Message-ID
<237967ef0806251336r67bdc13w5886dd1a42fa01e6@mail.gmail.com>
In-Reply-To
<7v63rx1ezw.fsf@gitster.siamese.dyndns.org>
2008/6/25 Junio C Hamano <gitster@pobox.com>:
Show 21 quoted lines
> "Mikael Magnusson" <mikachu@gmail.com> writes:
>
>> 2008/6/25 Jeff King <peff@peff.net>:
>>> On Wed, Jun 25, 2008 at 12:08:15PM -0400, Jeff King wrote:
>>>
>>>> Since you seem to be testing for-each-ref, maybe it would make sense to
>>>> put together a test script that exercises each of the atoms?
>>>
>>> Hmm. Actually, there is a test in t6300 that runs with each atom name.
>>> Unfortunately, it doesn't bother actually checking the output for
>>> sanity, so the fact that these atoms returned the empty string was
>>> missed.
>>
>> The documentation also says "tree" and "parent" should work (which they
>> also don't).
>
> The doc does not say any such thing.  A tag object does not have 'parent'
> nor 'tree' header fields.
>
> Neither a commit have 'object' nor 'type' header fields and you cannot ask
> for them when showing a commit object.
Ah, sorry, I read this paragraph:
              In addition to the above, for commit and tag objects,
the header field
              names (tree, parent, object, type, and tag) can be used
to specify the
              value in the header field.
But not this one (which perhaps should be right after the
                  above instead of 3 paragraphs down):
              In any case, a field name that refers to a field
inapplicable to the
              object referred by the ref does not cause an error. It
returns an empty
              string instead.
-- 
Mikael Magnusson
Previous: Junio C HamanoNext: Jeff King
Message 6 of 11 in “[Bug] for-each-ref: %(object) and %(type) unimplemented”
  1. Lea WiemannJun 25, 2008
  2. Jeff KingJun 25, 2008
  3. Jeff KingJun 25, 2008
  4. Mikael MagnussonJun 25, 2008
  5. Junio C HamanoJun 25, 2008
  6. Mikael MagnussonJun 25, 2008
  7. Jeff KingJun 26, 2008
  8. 1/2 improve for-each-ref test scriptJeff King, Jun 26, 2008
  9. 2/2 for-each-ref: implement missing tag valuesJeff King, Jun 26, 2008
  10. Jeff KingJun 26, 2008
  11. Junio C HamanoJun 26, 2008

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.