Thread (1 message) 1 message, 1 author, 2021-05-28

Re: [PATCH 2/2] [GSOC] ref-filter: add %(header) atom

From: Junio C Hamano <hidden>
Date: 2021-05-28 03:06:12

"ZheNing Hu via GitGitGadget" [off-list ref] writes:
From: ZheNing Hu <redacted>

Add new formatting option `%(header)`, which will print the
the structured header part of the raw object data.

In the storage layout of an object: blob and tree only
contains raw data; commit and tag raw data contains two part:
header and contents. The header of tag contains "object OOO",
"type TTT", "tag AAA", "tagger GGG"; The header of commit
contains "tree RRR", "parent PPP", "author UUU", "committer CCC".

Signed-off-by: ZheNing Hu <redacted>
---
 Documentation/git-for-each-ref.txt |  7 +++++
 ref-filter.c                       | 26 +++++++++++++++++
 t/t6300-for-each-ref.sh            | 45 ++++++++++++++++++++++++++++++
 3 files changed, 78 insertions(+)
While having this may not be wrong, I am not sure who needs it.  Is
your "cat-file --batch" topic needs this new atom?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help