Thread (9 messages) flat view 9 messages, 2 authors, 2022-09-19
STALE1423d

[PATCH 0/4] list-objects-filter cleanups

From: Jeff King <hidden>
Date: 2022-09-11 04:57:43

In the recent jk/plug-list-object-filter-leaks topic[1], I stopped short
of fixing all of the callers to actually initialize the filter struct
beyond zero-ing it.

This series does the cleanup that I was afraid to do there. :)

I think the end result is less confusing and error-prone. And as you can
see in patch 4, it matches how the code originally hoped to be written,
but the author was also afraid of the zero-initialization thing.

It is kind of churny, and carries some risk of regression (if I missed a
spot). IMHO it's worth it, but even if we don't take it, we should pick
up the first two patches, which are small bug-lets that the conversion
turned up.

These patches should be applied on top of jk/plug-list-object-filter-leaks,
which is currently in next.

  [1/4]: list-objects-filter: don't memset after releasing filter struct
  [2/4]: list-objects-filter: handle null default filter spec
  [3/4]: list-objects-filter: add and use initializers
  [4/4]: list-objects-filter: convert filter_spec to a strbuf

 builtin/clone.c               |  2 +-
 builtin/fetch-pack.c          |  1 +
 builtin/fetch.c               |  2 +-
 builtin/submodule--helper.c   |  8 ++--
 bundle.h                      |  1 +
 list-objects-filter-options.c | 75 ++++++++++++++---------------------
 list-objects-filter-options.h |  5 ++-
 revision.c                    |  1 +
 transport-helper.c            |  2 +
 transport.c                   |  1 +
 upload-pack.c                 |  1 +
 11 files changed, 47 insertions(+), 52 deletions(-)

-Peff

[1] https://lore.kernel.org/git/Yxl1BNQoy6Drf0Oe@coredump.intra.peff.net/ (local)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help