Skip to content

cat-file: reuse ref-filter logic

ZheNing Hu via GitGitGadget git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest19 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/19cat-file: handle trivial --batch format with --batch-all-objectsbuiltin/cat-file.c t/t1006-cat-file.sh+29 -60 replies
2/19cat-file: merge two block into onebuiltin/cat-file.c+1 -40 replies
3/19ref-filter: add obj-type check in grab contentsref-filter.c+15 -90 replies
4/19ref-filter: add %(raw) atomDocumentation/git-for-each-ref.txt ref-filter.c t/t6300-for-each-ref.sh+338 -270 replies
5/19ref-filter: --format=%(raw) re-support --perlDocumentation/git-for-each-ref.txt quote.c quote.h +2 more+48 -80 replies
6/19ref-filter: use non-const ref_format in *_atom_parser()builtin/tag.c ref-filter.c ref-filter.h+25 -250 replies
7/19ref-filter: add %(rest) atomref-filter.c ref-filter.h t/t3203-branch-output.sh +3 more+41 -10 replies
8/19ref-filter: pass get_object() return value to their callersref-filter.c+11 -60 replies
9/19ref-filter: introduce free_ref_array_item_value() functionref-filter.c ref-filter.h+10 -30 replies
10/19ref-filter: introduce reject_atom()ref-filter.c ref-filter.h+23 -30 replies
11/19ref-filter: modify the error message and value in get_objectref-filter.c t/t6301-for-each-ref-errors.sh+3 -30 replies
12/19cat-file: add has_object_file() checkbuiltin/cat-file.c+7 -00 replies
13/19cat-file: change batch_objects parameter namebuiltin/cat-file.c+10 -100 replies
14/19cat-file: reuse ref-filter logicDocumentation/git-cat-file.txt builtin/cat-file.c t/t1006-cat-file.sh+304 -19510 replies
15/19cat-file: reuse err buf in batch_object_write()builtin/cat-file.c+14 -80 replies
16/19cat-file: re-implement --textconv, --filters optionsbuiltin/cat-file.c ref-filter.c ref-filter.h+35 -30 replies
17/19ref-filter: remove grab_oid() functionref-filter.c+9 -170 replies
18/19cat-file: create p1006-cat-file.sht/perf/p1006-cat-file.sh+28 -00 replies
19/19cat-file: use fast path when using default_formatbuiltin/cat-file.c+57 -220 replies

Reviews trailers per patch

2 of 19 patches have a Reviewed-by or Acked-by.

PatchChristian CouderHariom VermaJunio C HamanoJeff KingÆvar Arnfjörð BjarmasonBagas SanjayaFelipe ContrerasPhillip WoodOlga TelezhnayaEric Sunshine
SeriesMentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Helped-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Mentored-by Helped-by Helped-by Helped-by Helped-by Helped-by Helped-by Helped-by Helped-by Helped-by Helped-by Helped-by Helped-by Helped-by Based-on-patch-by Helped-by Helped-by
1/19Helped-by A-b
2/19Helped-by A-b
3/19Mentored-by Mentored-by Helped-by
4/19Mentored-by Mentored-by Helped-by Helped-by Helped-by Helped-by Helped-by Based-on-patch-by
5/19Helped-by
6/19Mentored-by Mentored-by
7/19Mentored-by Mentored-by
8/19Mentored-by Mentored-by Helped-by
9/19Mentored-by Mentored-by Helped-by
10/19Helped-by Mentored-by Mentored-by Helped-by Helped-by
11/19Mentored-by Mentored-by
12/19Mentored-by Mentored-by
13/19Mentored-by Mentored-by
14/19Mentored-by Mentored-by
15/19Mentored-by Mentored-by
16/19Mentored-by Mentored-by
17/19Mentored-by Mentored-by
18/19Mentored-by Mentored-by Helped-by
19/19Mentored-by Mentored-by Helped-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 10 reviewers.

Read the v1 thread

Cover letter [PATCH 00/19] [GSOC] cat-file: reuse ref-filter logic

This patch series make cat-file reuse ref-filter logic.

Change from last version:

1. Declare buf_size in if (atom_type == ATOM_RAW) block.
2. Modify the code style of the test.
3. Delete "use_textconv" and "use_filter" flag. Instead, add member cat_file_cmdmode to struct ref_array_item.
4. Add function reject_atom() to enhance the readability of the code.
5. Create p1006-cat-file.sh for performance regression testing.
6. Use a "fast path" to output object data to reduce the performance degradation of cat-file --batch with the suggest of Ævar Arnfjörð Bjarmason.

ZheNing Hu (19):
cat-file: handle trivial --batch format with --batch-all-objects
cat-file: merge two block into one
[GSOC] ref-filter: add obj-type check in grab contents [GSOC] ref-filter: add %(raw) atom
[GSOC] ref-filter: --format=%(raw) re-support --perl [GSOC] ref-filter: use non-const ref_format in *_atom_parser() [GSOC] ref-filter: add %(rest) atom
[GSOC] ref-filter: pass get_object() return value to their callers [GSOC] ref-filter: introduce free_ref_array_item_value() function [GSOC] ref-filter: introduce reject_atom()
[GSOC] ref-filter: modify the error message and value in get_object [GSOC] cat-file: add has_object_file() check
[GSOC] cat-file: change batch_objects parameter name [GSOC] cat-file: reuse ref-filter logic
[GSOC] cat-file: reuse err buf in batch_object_write() [GSOC] cat-file: re-implement --textconv, --filters options [GSOC] ref-filter: remove grab_oid() function
[GSOC] cat-file: create p1006-cat-file.sh
[GSOC] cat-file: use fast path when using default_format

 Documentation/git-cat-file.txt     |   6 +
 Documentation/git-for-each-ref.txt |   9 +
 builtin/cat-file.c                 | 308 +++++++++----------------
 builtin/tag.c                      |   2 +-
 quote.c                            |  17 ++
 quote.h                            |   1 +
 ref-filter.c                       | 346 +++++++++++++++++++++--------
 ref-filter.h                       |  13 +-
 t/perf/p1006-cat-file.sh           |  28 +++
 t/t1006-cat-file.sh                | 273 +++++++++++++++++++++++
 t/t3203-branch-output.sh           |   4 +
 t/t6300-for-each-ref.sh            | 235 ++++++++++++++++++++
 t/t6301-for-each-ref-errors.sh     |   2 +-
 t/t7004-tag.sh                     |   4 +
 t/t7030-verify-tag.sh              |   4 +
 15 files changed, 955 insertions(+), 297 deletions(-)
 create mode 100755 t/perf/p1006-cat-file.sh

base-commit: d486ca60a51c9cb1fe068803c3f540724e95e83a
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-993%2Fadlternative%2Fcat-file-batch-refactor-2-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-993/adlternative/cat-file-batch-refactor-2-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/993

Signature · 1 line
gitgitgadget