Skip to content

pr-980/adlternative/cat-file-batch-refactor-v5

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

Change from last version:

 1. At the suggestion of Bagas Sanjaya, modified the expression of submitted
    information.
 2. Remove grab_oid() function in ref-filter to reduce repeated checks.

ZheNing Hu (15):
  [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: add cat_file_mode in struct ref_format
  [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

 Documentation/git-cat-file.txt     |   6 +
 Documentation/git-for-each-ref.txt |   9 +
 builtin/cat-file.c                 | 277 ++++++----------------
 builtin/tag.c                      |   2 +-
 quote.c                            |  17 ++
 quote.h                            |   1 +
 ref-filter.c                       | 357 ++++++++++++++++++++++-------
 ref-filter.h                       |  14 +-
 t/t1006-cat-file.sh                | 252 ++++++++++++++++++++
 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 +
 14 files changed, 888 insertions(+), 296 deletions(-)

base-commit: 1197f1a46360d3ae96bd9c15908a3a6f8e562207

Submitted-As: https://lore.kernel.org/git/pull.980.v5.git.1624636945.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.980.git.1623496458.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.980.v2.git.1623763746.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.980.v3.git.1624086181.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.980.v4.git.1624332054.gitgitgadget@gmail.com
Assets 2