git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Glen Choo" <chooglen@google.com>,
	"Emily Shaffer" <emilyshaffer@google.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH 0/8] submodule: tests, cleanup to prepare for built-in
Date: Wed,  2 Nov 2022 08:53:57 +0100	[thread overview]
Message-ID: <cover-0.8-00000000000-20221102T074148Z-avarab@gmail.com> (raw)

I have a topic on-list to remove git-submodule.sh and create a
builtin/submodule.c, i.e. promoting "git submodule--helper" to the
"real thing"[1].

Glen gave me a bunch of good feedback on it, including (but not
limited to) pointing out that we have outstanding dead code in
[2][3].

Once I started pulling at that thread things became a lot simpler for
the re-roll of [1], e.g. the migration of git-submodule.sh's commands
can squash in the "update" step, as it's no longer a special-case.

But that also made the series larger, and it's conflicted with other
outstanding patches. First René's strvec() cleanup in submodule.c, and
currently with Glen's in-flight submodule topic.

So here's "just the prep" part of that split-out. See also [4] and [5]
for previous "prep" topics, we're getting closer...

This only adds missing test coverage, and deletes dead code that we'd
otherwise have to account for. Then 8/8 converts submodule--helper to
use the OPT_SUBCOMMAND() API in 8/8.

CI & branch at: https://github.com/avar/git/tree/avar/submodule-builtin-final-prep

For a peek at the WIP re-roll of [1] that'll come after this:
https://github.com/avar/git/compare/avar/submodule-builtin-final-prep...avar/submodule-sh-dispatch-to-helper-directly-3

1. https://lore.kernel.org/git/cover-00.10-00000000000-20221017T115544Z-avarab@gmail.com/
2. https://lore.kernel.org/git/kl6lpmemxg8p.fsf@chooglen-macbookpro.roam.corp.google.com/
3. https://lore.kernel.org/git/kl6lv8oexiyy.fsf@chooglen-macbookpro.roam.corp.google.com/
4. 361cbe6d6d2 (Merge branch 'ab/submodule-cleanup', 2022-07-14)
5. f322e9f51b5 (Merge branch 'ab/submodule-helper-prep', 2022-09-13)

Ævar Arnfjörð Bjarmason (8):
  submodule--helper: move "config" to a test-tool
  submodule tests: add tests for top-level flag output
  submodule tests: test for a "foreach" blind-spot
  submodule.c: refactor recursive block out of absorb function
  submodule API & "absorbgitdirs": remove "----recursive" option
  submodule--helper: remove --prefix from "absorbgitdirs"
  submodule--helper: drop "update --prefix <pfx>" for "-C <pfx> update"
  submodule--helper: use OPT_SUBCOMMAND() API

 builtin/rm.c                           |   3 +-
 builtin/submodule--helper.c            | 139 ++++++--------------
 git-submodule.sh                       |   3 +-
 git.c                                  |   2 +-
 submodule.c                            |  41 +++---
 submodule.h                            |   4 +-
 t/helper/test-submodule.c              |  84 ++++++++++++
 t/t7400-submodule-basic.sh             |  10 ++
 t/t7407-submodule-foreach.sh           |   5 +
 t/t7411-submodule-config.sh            |  28 ++--
 t/t7418-submodule-sparse-gitmodules.sh |   4 +-
 t/t7422-submodule-output.sh            | 169 +++++++++++++++++++++++++
 12 files changed, 349 insertions(+), 143 deletions(-)
 create mode 100755 t/t7422-submodule-output.sh

-- 
2.38.0.1280.g8136eb6fab2


             reply	other threads:[~2022-11-02  7:54 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-02  7:53 Ævar Arnfjörð Bjarmason [this message]
2022-11-02  7:53 ` [PATCH 1/8] submodule--helper: move "config" to a test-tool Ævar Arnfjörð Bjarmason
2022-11-03 22:09   ` Glen Choo
2022-11-02  7:53 ` [PATCH 2/8] submodule tests: add tests for top-level flag output Ævar Arnfjörð Bjarmason
2022-11-03 22:30   ` Glen Choo
2022-11-02  7:54 ` [PATCH 3/8] submodule tests: test for a "foreach" blind-spot Ævar Arnfjörð Bjarmason
2022-11-02  7:54 ` [PATCH 4/8] submodule.c: refactor recursive block out of absorb function Ævar Arnfjörð Bjarmason
2022-11-02  7:54 ` [PATCH 5/8] submodule API & "absorbgitdirs": remove "----recursive" option Ævar Arnfjörð Bjarmason
2022-11-03 22:53   ` Glen Choo
2022-11-04  1:42     ` Ævar Arnfjörð Bjarmason
2022-11-04 13:07       ` FW: " Simpson, Phyllis
2022-11-04 17:08       ` Glen Choo
2022-11-02  7:54 ` [PATCH 6/8] submodule--helper: remove --prefix from "absorbgitdirs" Ævar Arnfjörð Bjarmason
2022-11-02  7:54 ` [PATCH 7/8] submodule--helper: drop "update --prefix <pfx>" for "-C <pfx> update" Ævar Arnfjörð Bjarmason
2022-11-02  7:54 ` [PATCH 8/8] submodule--helper: use OPT_SUBCOMMAND() API Ævar Arnfjörð Bjarmason
2022-11-03 23:31   ` Glen Choo
2022-11-04  1:22     ` Ævar Arnfjörð Bjarmason
2022-11-04 17:02       ` Glen Choo
2022-11-05 14:23         ` Ævar Arnfjörð Bjarmason
2022-11-07 17:16           ` Glen Choo
2022-11-04 17:10 ` [PATCH 0/8] submodule: tests, cleanup to prepare for built-in Glen Choo
2022-11-04 19:07   ` Taylor Blau
2022-11-08 14:10 ` [PATCH v2 0/9] " Ævar Arnfjörð Bjarmason
2022-11-08 14:10   ` [PATCH v2 1/9] submodule--helper: move "config" to a test-tool Ævar Arnfjörð Bjarmason
2022-11-08 14:10   ` [PATCH v2 2/9] submodule tests: add tests for top-level flag output Ævar Arnfjörð Bjarmason
2022-11-08 14:10   ` [PATCH v2 3/9] submodule--helper: fix a memory leak in "status" Ævar Arnfjörð Bjarmason
2022-11-08 14:10   ` [PATCH v2 4/9] submodule tests: test for a "foreach" blind-spot Ævar Arnfjörð Bjarmason
2022-11-08 14:10   ` [PATCH v2 5/9] submodule.c: refactor recursive block out of absorb function Ævar Arnfjörð Bjarmason
2022-11-08 14:10   ` [PATCH v2 6/9] submodule API & "absorbgitdirs": remove "----recursive" option Ævar Arnfjörð Bjarmason
2022-11-08 14:10   ` [PATCH v2 7/9] submodule--helper: remove --prefix from "absorbgitdirs" Ævar Arnfjörð Bjarmason
2022-11-08 14:10   ` [PATCH v2 8/9] submodule--helper: drop "update --prefix <pfx>" for "-C <pfx> update" Ævar Arnfjörð Bjarmason
2022-11-08 14:10   ` [PATCH v2 9/9] submodule--helper: use OPT_SUBCOMMAND() API Ævar Arnfjörð Bjarmason
2022-11-08 18:30   ` [PATCH v2 0/9] submodule: tests, cleanup to prepare for built-in Glen Choo
2022-11-08 18:34     ` Ævar Arnfjörð Bjarmason
2022-11-08 19:20       ` Glen Choo

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=cover-0.8-00000000000-20221102T074148Z-avarab@gmail.com \
    --to=avarab@gmail.com \
    --cc=chooglen@google.com \
    --cc=emilyshaffer@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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 NNTP newsgroup(s).