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

Re: [PATCH 1/5] [GSOC] ref-filter: add obj-type check in grab contents

From
ZheNing Hu <adlternative@gmail.com>
Date
Jul 22, 2021, 09:15 UTC
Message-ID
<CAOLTT8SNgbJRnmtfL4J=ypo1Q98gY9DE3g6BjBnX895tkMLcng@mail.gmail.com>
In-Reply-To
<CAP8UFD3nmnu7fEOG75O46qEKtFHppbeZy3Y-NkPTCgphM5MPqA@mail.gmail.com>
Christian Couder <christian.couder@gmail.com> 于2021年7月22日周四 下午4:51写道:
Show 23 quoted lines
>
> On Thu, Jul 22, 2021 at 9:39 AM ZheNing Hu via GitGitGadget
> <gitgitgadget@gmail.com> wrote:
> >
> > From: ZheNing Hu <adlternative@gmail.com>
> >
> > Only tag and commit objects use `grab_sub_body_contents()` to grab
> > object contents in the current codebase.  We want to teach the
> > function to also handle blobs and trees to get their raw data,
> > without parsing a blob (whose contents looks like a commit or a tag)
> > incorrectly as a commit or a tag.
> >
> > Skip the block of code that is specific to handling commits and tags
> > early when the given object is of a wrong type to help later
> > addition to handle other types of objects in this function.
>
> Small nit in case the series is rerolled: it looks like this commit
> would change only `grab_sub_body_contents()`, but there are a few
> changes to grab_values() too. Maybe you could add that it's needed to
> pass a `struct expand_data *data` instead of only `void *buf` to both
> `grab_sub_body_contents()` and `grab_values()` to be able to check the
> object type.
>
Indeed so. I will add them.

Thanks. -- ZheNing Hu

Previous: Christian CouderNext: ZheNing Hu via GitGitGadget
Message 4 of 45 in “[GSOC] ref-filter: add %(raw) and %(rest) atoms”
  1. 0/5 [GSOC] ref-filter: add %(raw) and %(rest) atomsZheNing Hu via GitGitGadget, Jul 22, 2021
  2. 1/5 [GSOC] ref-filter: add obj-type check in grab contentsZheNing Hu via GitGitGadget, Jul 22, 2021
  3. Christian CouderJul 22, 2021
  4. ZheNing HuJul 22, 2021
  5. 2/5 [GSOC] ref-filter: add %(raw) atomZheNing Hu via GitGitGadget, Jul 22, 2021
  6. Ævar Arnfjörð BjarmasonJul 22, 2021
  7. ZheNing HuJul 22, 2021
  8. 3/5 [GSOC] ref-filter: --format=%(raw) re-support --perlZheNing Hu via GitGitGadget, Jul 22, 2021
  9. 4/5 [GSOC] ref-filter: use non-const ref_format in *_atom_parser()ZheNing Hu via GitGitGadget, Jul 22, 2021
  10. 5/5 [GSOC] ref-filter: add %(rest) atomZheNing Hu via GitGitGadget, Jul 22, 2021
  11. Ævar Arnfjörð BjarmasonJul 22, 2021
  12. ZheNing HuJul 22, 2021
  13. Jacob KellerJul 23, 2021
  14. ZheNing HuJul 23, 2021
  15. Christian CouderJul 22, 2021
  16. ZheNing HuJul 22, 2021
  17. 0/5 [GSOC] ref-filter: add %(raw) and %(rest) atomsZheNing Hu via GitGitGadget, Jul 23, 2021
  18. 1/5 [GSOC] ref-filter: add obj-type check in grab contentsZheNing Hu via GitGitGadget, Jul 23, 2021
  19. 3/5 [GSOC] ref-filter: --format=%(raw) re-support --perlZheNing Hu via GitGitGadget, Jul 23, 2021
  20. 2/5 [GSOC] ref-filter: add %(raw) atomZheNing Hu via GitGitGadget, Jul 23, 2021
  21. Junio C HamanoJul 23, 2021
  22. ZheNing HuJul 24, 2021
  23. Junio C HamanoJul 24, 2021
  24. ZheNing HuJul 25, 2021
  25. 4/5 [GSOC] ref-filter: use non-const ref_format in *_atom_parser()ZheNing Hu via GitGitGadget, Jul 23, 2021
  26. 5/5 [GSOC] ref-filter: add %(rest) atomZheNing Hu via GitGitGadget, Jul 23, 2021
  27. 0/5 [GSOC] ref-filter: add %(raw) and %(rest) atomsZheNing Hu via GitGitGadget, Jul 24, 2021
  28. 1/5 [GSOC] ref-filter: add obj-type check in grab contentsZheNing Hu via GitGitGadget, Jul 24, 2021
  29. Jacob KellerJul 25, 2021
  30. 2/5 [GSOC] ref-filter: add %(raw) atomZheNing Hu via GitGitGadget, Jul 24, 2021
  31. 3/5 [GSOC] ref-filter: --format=%(raw) re-support --perlZheNing Hu via GitGitGadget, Jul 24, 2021
  32. Jacob KellerJul 25, 2021
  33. ZheNing HuJul 25, 2021
  34. 4/5 [GSOC] ref-filter: use non-const ref_format in *_atom_parser()ZheNing Hu via GitGitGadget, Jul 24, 2021
  35. 5/5 [GSOC] ref-filter: add %(rest) atomZheNing Hu via GitGitGadget, Jul 24, 2021
  36. Jacob KellerJul 25, 2021
  37. Junio C HamanoJul 26, 2021
  38. 0/5 [GSOC] ref-filter: add %(raw) and %(rest) atomsZheNing Hu via GitGitGadget, Jul 26, 2021
  39. 1/5 [GSOC] ref-filter: add obj-type check in grab contentsZheNing Hu via GitGitGadget, Jul 26, 2021
  40. Junio C HamanoJul 26, 2021
  41. ZheNing HuJul 27, 2021
  42. 2/5 [GSOC] ref-filter: add %(raw) atomZheNing Hu via GitGitGadget, Jul 26, 2021
  43. 3/5 [GSOC] ref-filter: --format=%(raw) support --perlZheNing Hu via GitGitGadget, Jul 26, 2021
  44. 4/5 [GSOC] ref-filter: use non-const ref_format in *_atom_parser()ZheNing Hu via GitGitGadget, Jul 26, 2021
  45. 5/5 [GSOC] ref-filter: add %(rest) atomZheNing Hu via GitGitGadget, Jul 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.