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

Re: [PATCH 0/3] cat-file: add %(objectmode) avoid verifying submodules' OIDs

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 11, 2024, 21:43 UTC
Message-ID
<xmqqwmq8o36j.fsf@gitster.g>
In-Reply-To
<pull.1689.git.1710183362.gitgitgadget@gmail.com>

"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> writes:

Show 5 quoted lines
> The cat-file --batch command is very valuable in server settings, but so far
> it is missing a bit of functionality that would come in handy there.
>
> For example, it is sometimes necessary to determine the object mode of a
> batch of tree objects' children.
OK.

It is somewhat unsatisfying that --batch/--batch-check lacks so much. Even with %(objectmode) its nature of one-object-at-a-time makes querying children of a large tree a chore, when you compare it with something like "cat-file -p HEAD:" that allows you to grab the needed information for all children with a single invocation.

This is orthogonal to what the patch wants to do, which is to enrich the output side with more formatting, bit I wonder if we want to consider enriching the input side? e.g. instead of feeding just a single object name from the standard input of "cat-file --batch/--batch-check", perhaps a syntax can say "Here I have the object name for a tree-ish object, but please pretend that I gave you all the objects contained within it", or something?

Thanks, will queue.
Previous: Junio C HamanoNext: Jeff King
Message 12 of 15 in “cat-file: add %(objectmode) avoid verifying submodules' OIDs”
  1. 0/3 cat-file: add %(objectmode) avoid verifying submodules' OIDsJohannes Schindelin via GitGitGadget, Mar 11, 2024
  2. 1/3 t1006: update 'run_tests' to test generic object specifiersVictoria Dye via GitGitGadget, Mar 11, 2024
  3. Junio C HamanoMar 11, 2024
  4. 2/3 cat-file: add %(objectmode) atomVictoria Dye via GitGitGadget, Mar 11, 2024
  5. Junio C HamanoMar 11, 2024
  6. Junio C HamanoMar 13, 2024
  7. 3/3 cat-file: avoid verifying submodules' OIDsJohannes Schindelin via GitGitGadget, Mar 11, 2024
  8. Jeff KingMar 12, 2024
  9. Junio C HamanoMar 12, 2024
  10. Jeff KingMar 12, 2024
  11. Junio C HamanoMar 13, 2024
  12. Junio C HamanoMar 11, 2024
  13. Jeff KingMar 12, 2024
  14. Junio C HamanoMar 12, 2024
  15. Jeff KingMar 12, 2024

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.