git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: git@vger.kernel.org
Cc: Derrick Stolee <derrickstolee@github.com>
Subject: [PATCH 0/4] list-objects-filter cleanups
Date: Sun, 11 Sep 2022 00:57:38 -0400	[thread overview]
Message-ID: <Yx1qwlpNbxGEiUgc@coredump.intra.peff.net> (raw)

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/

             reply	other threads:[~2022-09-11  4:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-11  4:57 Jeff King [this message]
2022-09-11  4:58 ` [PATCH 1/4] list-objects-filter: don't memset after releasing filter struct Jeff King
2022-09-12 15:40   ` Junio C Hamano
2022-09-11  5:00 ` [PATCH 2/4] list-objects-filter: handle null default filter spec Jeff King
2022-09-12 16:56   ` Junio C Hamano
2022-09-11  5:03 ` [PATCH 3/4] list-objects-filter: add and use initializers Jeff King
2022-09-11  5:03 ` [PATCH 4/4] list-objects-filter: convert filter_spec to a strbuf Jeff King
2022-09-19 17:50   ` Derrick Stolee
2022-09-19 19:05     ` Jeff King
2022-09-11  5:07 ` [PATCH 0/4] list-objects-filter cleanups Jeff King
2022-09-19 17:51 ` Derrick Stolee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yx1qwlpNbxGEiUgc@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=derrickstolee@github.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).