[PATCH 0/8] submodule: tests, cleanup to prepare for built-in

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx/
2. https://lore.kernel.org/git/kl6lpmemxg8p.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
3. https://lore.kernel.org/git/kl6lv8oexiyy.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux