From: Elijah Newren <newren@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, Calvin Wan <calvinwan@google.com>,
Derrick Stolee <derrickstolee@github.com>,
Glen Choo <chooglen@google.com>
Subject: Re: [PATCH v2 16/22] treewide: remove cache.h inclusion due to previous changes
Date: Mon, 1 May 2023 18:25:00 -0700 [thread overview]
Message-ID: <CABPp-BEoCtmSwicpukd8SQZaL7ffTAW6su0mys3tXapr1UufEw@mail.gmail.com> (raw)
In-Reply-To: <230501.86v8hchuay.gmgdl@evledraar.gmail.com>
On Mon, May 1, 2023 at 9:48 AM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
>
> On Sat, Apr 22 2023, Elijah Newren via GitGitGadget wrote:
>
> The "Subject" says "due to previous changes", but...
>
> > From: Elijah Newren <newren@gmail.com>
> >
> > Signed-off-by: Elijah Newren <newren@gmail.com>
> > ---
> > archive-zip.c | 2 +-
> > bundle-uri.c | 2 +-
> > color.c | 2 +-
> > combine-diff.c | 2 +-
> > common-main.c | 2 +-
> > config.c | 2 +-
> > copy.c | 2 +-
> > credential.c | 2 +-
> > daemon.c | 2 +-
> > date.c | 2 +-
> > diagnose.c | 2 +-
> > environment.c | 2 +-
> > ll-merge.c | 2 +-
> > match-trees.c | 2 +-
> > midx.c | 2 +-
> > object-file.c | 2 +-
> > packfile.c | 2 +-
> > pkt-line.c | 2 +-
> > range-diff.c | 2 +-
> > ref-filter.c | 2 +-
> > t/helper/test-match-trees.c | 1 -
> > t/helper/test-mergesort.c | 1 -
> > t/helper/test-oid-array.c | 1 -
> > t/helper/test-oidtree.c | 1 -
> > t/helper/test-parse-options.c | 1 -
> > t/helper/test-read-midx.c | 1 -
> > t/helper/test-string-list.c | 1 -
> > tree-diff.c | 2 +-
> > tree-walk.c | 2 +-
> > tree.c | 2 +-
> > wrapper.c | 3 ++-
> > 31 files changed, 25 insertions(+), 31 deletions(-)
> >
> > diff --git a/archive-zip.c b/archive-zip.c
> > index ef538a90df4..d0d065a312e 100644
> > --- a/archive-zip.c
> > +++ b/archive-zip.c
> > @@ -1,7 +1,7 @@
> > /*
> > * Copyright (c) 2006 Rene Scharfe
> > */
> > -#include "cache.h"
> > +#include "git-compat-util.h"
> > #include "config.h"
> > #include "archive.h"
> > #include "gettext.h"
>
> I tried making this change before this series was applied, and
> everything compiled...
Yeah, this actually could have been done as part of b7b189cd5ae
("treewide: reduce includes of cache.h in other headers", 2023-04-11),
which was from the series before this one.
> > diff --git a/bundle-uri.c b/bundle-uri.c
> > index 6d44662ee1f..ec1552bbca2 100644
> > --- a/bundle-uri.c
> > +++ b/bundle-uri.c
> > @@ -1,4 +1,4 @@
> > -#include "cache.h"
> > +#include "git-compat-util.h"
> > #include "bundle-uri.h"
> > #include "bundle.h"
> > #include "copy.h"
>
> That's not the case here, but this could instead be squashed into the
> 05/22 in this series, i.e. as soon as we add this copy.h, we don't need
> cache.h anymore.
>
> > diff --git a/color.c b/color.c
> > index f8a25ca807b..83abb11eda0 100644
> > --- a/color.c
> > +++ b/color.c
> > @@ -1,4 +1,4 @@
> > -#include "cache.h"
> > +#include "git-compat-util.h"
> > #include "config.h"
> > #include "color.h"
> > #include "editor.h"
>
> I did not look further, but all of the rest of these look like they'd be
> better off squashed into the respective "split this out" commit. I don't
> think keeping the "move declarations for ..." as "move-only" commits is
> worth it, as opposed to getting rid of this one, and making those
> atomic.
So, while that could be done, I found it harder to review my own
changes personally, and thought others would as well. If you're
looking through several dozen files for a single change (add one new
header), it's easy to fly through and be confident you didn't miss
anything, but when there are sometimes two changes (also replace
cache.h with git-compat-util.h, or just outright remove it if
git-compat-util.h is already included), then that slows review down
dramatically.
In the previous series, I addressed this by splitting each patch into
two -- (1) move declarations to new header and add new relevant
include, (2) remove the cache.h includes that was allowed by that
change. See patches 7-18 at
https://lore.kernel.org/git/pull.1509.git.1680361837.gitgitgadget@gmail.com/#r
.
But having half a dozen commits labelled "treewide: remove cache.h
inclusion due to header changes in previous patch", seemed like a bit
of a pain too. So I instead batched them up and did them all at once.
I could revert back to how I did it in the previous series, but I
think I'd want to keep the commits that are adding a new header
separate from the ones that remove includes of cache.h.
next prev parent reply other threads:[~2023-05-02 1:25 UTC|newest]
Thread overview: 81+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-16 3:03 [PATCH 00/23] Header cleanups (more splitting of cache.h and simplifying a few other deps) Elijah Newren via GitGitGadget
2023-04-16 3:03 ` [PATCH 01/23] treewide: be explicit about dependence on strbuf.h Elijah Newren via GitGitGadget
2023-04-16 3:03 ` [PATCH 02/23] symlinks.h: move declarations for symlinks.c functions from cache.h Elijah Newren via GitGitGadget
2023-04-16 3:03 ` [PATCH 03/23] protocol.h: move definition of DEFAULT_GIT_PORT " Elijah Newren via GitGitGadget
2023-04-16 3:03 ` [PATCH 04/23] packfile.h: move pack_window and pack_entry " Elijah Newren via GitGitGadget
2023-04-16 3:03 ` [PATCH 05/23] server-info.h: move declarations for server-info.c functions " Elijah Newren via GitGitGadget
2023-04-16 3:03 ` [PATCH 06/23] copy.h: move declarations for copy.c " Elijah Newren via GitGitGadget
2023-04-16 3:03 ` [PATCH 07/23] base85.h: move declarations for base85.c " Elijah Newren via GitGitGadget
2023-04-16 3:03 ` [PATCH 08/23] pkt-line.h: move declarations for pkt-line.c " Elijah Newren via GitGitGadget
2023-04-16 3:03 ` [PATCH 09/23] match-trees.h: move declarations for match-trees.c " Elijah Newren via GitGitGadget
2023-04-16 3:03 ` [PATCH 10/23] ws.h: move declarations for ws.c " Elijah Newren via GitGitGadget
2023-04-16 3:03 ` [PATCH 11/23] versioncmp.h: move declarations for versioncmp.c " Elijah Newren via GitGitGadget
2023-04-16 3:03 ` [PATCH 12/23] dir.h: move DTYPE defines " Elijah Newren via GitGitGadget
2023-04-16 3:03 ` [PATCH 13/23] tree-diff.c: move S_DIFFTREE_IFXMIN_NEQ define " Elijah Newren via GitGitGadget
2023-04-16 3:03 ` [PATCH 14/23] hash.h, repository.h: reverse the order of these dependencies Elijah Newren via GitGitGadget
2023-04-17 20:59 ` Derrick Stolee
2023-04-18 2:36 ` Elijah Newren
2023-04-18 23:29 ` Junio C Hamano
2023-04-20 5:06 ` Elijah Newren
2023-04-20 13:14 ` Derrick Stolee
2023-04-20 15:54 ` Junio C Hamano
2023-04-20 19:54 ` Glen Choo
2023-04-16 3:03 ` [PATCH 15/23] cache,tree: move cmp_cache_name_compare from tree.[ch] to read-cache.c Elijah Newren via GitGitGadget
2023-04-16 3:03 ` [PATCH 16/23] cache,tree: move basic name compare functions from read-cache to tree Elijah Newren via GitGitGadget
2023-04-16 3:03 ` [PATCH 17/23] treewide: remove cache.h inclusion due to previous changes Elijah Newren via GitGitGadget
2023-04-16 3:03 ` [PATCH 18/23] cache.h: remove unnecessary headers Elijah Newren via GitGitGadget
2023-04-16 3:03 ` [PATCH 19/23] fsmonitor: reduce includes of cache.h Elijah Newren via GitGitGadget
2023-04-16 3:03 ` [PATCH 20/23] commit.h: reduce unnecessary includes Elijah Newren via GitGitGadget
2023-04-16 3:03 ` [PATCH 21/23] object-store.h: " Elijah Newren via GitGitGadget
2023-04-16 3:03 ` [PATCH 22/23] diff.h: " Elijah Newren via GitGitGadget
2023-04-16 3:03 ` [PATCH 23/23] reftable: ensure git-compat-util.h is the first (indirect) include Elijah Newren via GitGitGadget
2023-04-17 21:07 ` [PATCH 00/23] Header cleanups (more splitting of cache.h and simplifying a few other deps) Derrick Stolee
2023-04-18 2:41 ` Elijah Newren
2023-04-22 20:17 ` [PATCH v2 00/22] " Elijah Newren via GitGitGadget
2023-04-22 20:17 ` [PATCH v2 01/22] treewide: be explicit about dependence on strbuf.h Elijah Newren via GitGitGadget
2023-04-22 20:17 ` [PATCH v2 02/22] symlinks.h: move declarations for symlinks.c functions from cache.h Elijah Newren via GitGitGadget
2023-04-22 20:17 ` [PATCH v2 03/22] packfile.h: move pack_window and pack_entry " Elijah Newren via GitGitGadget
2023-04-22 20:17 ` [PATCH v2 04/22] server-info.h: move declarations for server-info.c functions " Elijah Newren via GitGitGadget
2023-04-22 20:17 ` [PATCH v2 05/22] copy.h: move declarations for copy.c " Elijah Newren via GitGitGadget
2023-04-22 20:17 ` [PATCH v2 06/22] base85.h: move declarations for base85.c " Elijah Newren via GitGitGadget
2023-04-22 20:17 ` [PATCH v2 07/22] pkt-line.h: move declarations for pkt-line.c " Elijah Newren via GitGitGadget
2023-04-22 20:17 ` [PATCH v2 08/22] match-trees.h: move declarations for match-trees.c " Elijah Newren via GitGitGadget
2023-04-22 20:17 ` [PATCH v2 09/22] ws.h: move declarations for ws.c " Elijah Newren via GitGitGadget
2023-04-22 20:17 ` [PATCH v2 10/22] versioncmp.h: move declarations for versioncmp.c " Elijah Newren via GitGitGadget
2023-04-22 20:17 ` [PATCH v2 11/22] dir.h: move DTYPE defines " Elijah Newren via GitGitGadget
2023-04-22 20:17 ` [PATCH v2 12/22] tree-diff.c: move S_DIFFTREE_IFXMIN_NEQ define " Elijah Newren via GitGitGadget
2023-05-01 16:33 ` Ævar Arnfjörð Bjarmason
2023-05-01 16:46 ` Junio C Hamano
2023-05-02 1:06 ` Elijah Newren
2023-05-02 5:00 ` Elijah Newren
2023-05-02 15:56 ` Junio C Hamano
2023-05-02 15:59 ` Elijah Newren
2023-04-22 20:17 ` [PATCH v2 13/22] hash-ll.h: split out of hash.h to remove dependency on repository.h Elijah Newren via GitGitGadget
2023-04-24 18:51 ` Glen Choo
2023-04-26 3:54 ` Elijah Newren
2023-04-26 17:50 ` Glen Choo
2023-04-24 19:52 ` Junio C Hamano
2023-05-01 17:17 ` Ævar Arnfjörð Bjarmason
2023-05-02 2:53 ` Elijah Newren
2023-04-22 20:17 ` [PATCH v2 14/22] cache,tree: move cmp_cache_name_compare from tree.[ch] to read-cache.c Elijah Newren via GitGitGadget
2023-04-22 20:17 ` [PATCH v2 15/22] cache,tree: move basic name compare functions from read-cache to tree Elijah Newren via GitGitGadget
2023-04-22 20:17 ` [PATCH v2 16/22] treewide: remove cache.h inclusion due to previous changes Elijah Newren via GitGitGadget
2023-05-01 16:44 ` Ævar Arnfjörð Bjarmason
2023-05-02 1:25 ` Elijah Newren [this message]
2023-04-22 20:17 ` [PATCH v2 17/22] cache.h: remove unnecessary headers Elijah Newren via GitGitGadget
2023-05-01 16:49 ` Ævar Arnfjörð Bjarmason
2023-05-02 1:43 ` Elijah Newren
2023-04-22 20:17 ` [PATCH v2 18/22] fsmonitor: reduce includes of cache.h Elijah Newren via GitGitGadget
2023-04-22 20:17 ` [PATCH v2 19/22] commit.h: reduce unnecessary includes Elijah Newren via GitGitGadget
2023-05-01 16:52 ` Ævar Arnfjörð Bjarmason
2023-05-02 1:53 ` Elijah Newren
2023-04-22 20:17 ` [PATCH v2 20/22] object-store.h: " Elijah Newren via GitGitGadget
2023-05-01 17:00 ` Ævar Arnfjörð Bjarmason
2023-05-02 2:28 ` Elijah Newren
2023-04-22 20:17 ` [PATCH v2 21/22] diff.h: " Elijah Newren via GitGitGadget
2023-05-01 17:11 ` Ævar Arnfjörð Bjarmason
2023-04-22 20:17 ` [PATCH v2 22/22] reftable: ensure git-compat-util.h is the first (indirect) include Elijah Newren via GitGitGadget
2023-04-24 15:19 ` [PATCH v2 00/22] Header cleanups (more splitting of cache.h and simplifying a few other deps) Derrick Stolee
2023-04-24 19:49 ` Junio C Hamano
2023-04-26 17:54 ` Glen Choo
2023-04-26 18:14 ` Junio C Hamano
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABPp-BEoCtmSwicpukd8SQZaL7ffTAW6su0mys3tXapr1UufEw@mail.gmail.com \
--to=newren@gmail.com \
--cc=avarab@gmail.com \
--cc=calvinwan@google.com \
--cc=chooglen@google.com \
--cc=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
/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.
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).