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

Re: [PATCH 2/3] [GSOC] ref-filter: support %(contents) for blob, tree

From
Junio C Hamano <gitster@pobox.com>
Date
May 25, 2021, 17:11 UTC
Message-ID
<xmqqczteeo11.fsf@gitster.g>
In-Reply-To
<CAOLTT8TaJm=9mQNXMGxt-bME-ynOpv4CKZvZw+yo9zNueH_VPw@mail.gmail.com>
ZheNing Hu <adlternative@gmail.com> writes:
> So I don't know if adding %(header) will cause duplication of functions.

I do not think you can duplicate the feature of %(header) with other existing placeholders. You may want to dump the headers of series of commits so that you can find if there is any commit with unusal header elements, but %(tree), %(parents), etc. would by definition be the known ones, so any combination of them will not be a substitute.

But nobody is asking for it right now, and your cat-file --batch does not need it right away.

What I wanted to say in the message you are responding to was *not* that you would want to add %(header) for completeness right now. But thinking beyond your immediate need (i.e. the "whole thing") and imagining how various pieces, including the ones that do not exist yet, would fit together, would help you to avoid designing the parts you immediately need in a way you would regret in the future.

Previous: ZheNing HuNext: ZheNing Hu
Message 7 of 18 in “[GSOC][RFC] ref-filter: add contents:raw atom”
  1. 0/3 [GSOC][RFC] ref-filter: add contents:raw atomZheNing Hu via GitGitGadget, May 23, 2021
  2. 1/3 [GSOC] quote: add *.quote_buf_with_size functionsZheNing Hu via GitGitGadget, May 23, 2021
  3. 2/3 [GSOC] ref-filter: support %(contents) for blob, treeZheNing Hu via GitGitGadget, May 23, 2021
  4. Junio C HamanoMay 25, 2021
  5. Junio C HamanoMay 25, 2021
  6. ZheNing HuMay 25, 2021
  7. Junio C HamanoMay 25, 2021
  8. ZheNing HuMay 26, 2021
  9. 3/3 [GSOC] ref-filter: add contents:raw atomZheNing Hu via GitGitGadget, May 23, 2021
  10. Junio C HamanoMay 24, 2021
  11. Felipe ContrerasMay 24, 2021
  12. Bagas SanjayaMay 24, 2021
  13. Junio C HamanoMay 24, 2021
  14. ZheNing HuMay 24, 2021
  15. Junio C HamanoMay 26, 2021
  16. ZheNing HuMay 26, 2021
  17. Junio C HamanoMay 26, 2021
  18. ZheNing HuMay 26, 2021

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.