git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/7] Finish converting "submodule update" to C
@ 2022-03-15 21:09 Glen Choo
  2022-03-15 21:09 ` [PATCH 1/7] submodule--helper: run update using child process struct Glen Choo
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Glen Choo @ 2022-03-15 21:09 UTC (permalink / raw)
  To: git
  Cc: Glen Choo, Junio C Hamano, Atharva Raykar, Emily Shaffer,
	Ævar Arnfjörð Bjarmason

Original series: https://lore.kernel.org/git/20220210092833.55360-1-chooglen@google.com
"git submodule update" in C part 1: https://lore.kernel.org/git/20220301000816.56177-1-chooglen@google.com/
Based off 'gc/submodule-update-part-1'.

= Overview

This is part 2 of 2 series that supersedes ar/submodule-update. This
finishes the conversion of "git submodule update" to C by:

- combining the constituent "git submodule--helper" commands
  ("update-clone" and "run-update-procedure") to create "git
  submodule--helper update"
- converting the --recursive flag to C by teaching "git
  submodule--helper update" to invoke itself

This also fixes a test failure that Junio noted in
https://lore.kernel.org/git/xmqqr18770pc.fsf@gitster.g (see patch 6 for
more details).

= Known conflicts

This series is missing some functionality introduced in the in-flight
es/superproject-aware-submodules [1], namely, that "git submodule
update" sets `submodule.hasSuperproject` on all submodules. I intended
for this to go _after_ es/superproject-aware-submodules, and in that
series, Emily and I tried to simplify this conflict by preemptively
doing this in C (see that series' v9 cover letter [1]).

That discussion is still ongoing, but it seems helpful to send this
series anyway (thanks to all who weighed in over IRC [2]). At any rate,
neither series really depends on the other, so this series is still
independently reviewable, but with the caveat that I may add another
patch that adds the missing behavior (it will probably look something
like [3]).

Alternatively, this series might graduate first. In which case, I'll
continue working with Emily to fix the conflict.

= Patch organization

This series largely follows the remaining ar/submodule-update patches
that weren't included in part 1 and some additional clean ups. One
notable difference vis-a-vis ar/submodule-update is that the CLI args
for "update-clone" are no longer copied across structs (see patch 4 for
more details).

- Patches 1-2 teaches "run-update-procedure" to exit and report its
  failures in a more idiomatic manner instead of relying on
  git-submodule.sh.
- Patches 3-4 prepare for "run-update-procedure" and
  "update-clone"'s args to be merged into a single struct.
- Patches 5-6 finish the process of implementing `submodule--helper
  update`.
- Patch 7 cleans up a forward declaration that kept the diffs small
  while we were in the process of conversion, but is no longer needed.

[1] https://lore.kernel.org/git/20220310004423.2627181-1-emilyshaffer@google.com
[2] https://colabti.org/irclogger/irclogger_log/git-devel?date=2022-03-14
[3] https://lore.kernel.org/git/kl6l1qz9s6tu.fsf@chooglen-macbookpro.roam.corp.google.com

Atharva Raykar (2):
  submodule--helper: run update using child process struct
  submodule: move core cmd_update() logic to C

Glen Choo (4):
  submodule update: use die_message()
  submodule--helper: teach update_data more options
  submodule--helper: reduce logic in run_update_procedure()
  submodule--helper: remove forward declaration

Ævar Arnfjörð Bjarmason (1):
  builtin/submodule--helper.c: rename option struct to "opt"

 builtin/submodule--helper.c | 691 ++++++++++++++++++------------------
 git-submodule.sh            | 105 +-----
 2 files changed, 361 insertions(+), 435 deletions(-)


base-commit: c9d256249375c7b8a1773139791448860b5789ff
-- 
2.33.GIT


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-03-15 21:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-15 21:09 [PATCH 0/7] Finish converting "submodule update" to C Glen Choo
2022-03-15 21:09 ` [PATCH 1/7] submodule--helper: run update using child process struct Glen Choo
2022-03-15 21:09 ` [PATCH 2/7] submodule update: use die_message() Glen Choo
2022-03-15 21:09 ` [PATCH 3/7] builtin/submodule--helper.c: rename option struct to "opt" Glen Choo
2022-03-15 21:09 ` [PATCH 4/7] submodule--helper: teach update_data more options Glen Choo
2022-03-15 21:09 ` [PATCH 5/7] submodule--helper: reduce logic in run_update_procedure() Glen Choo
2022-03-15 21:09 ` [PATCH 6/7] submodule: move core cmd_update() logic to C Glen Choo
2022-03-15 21:09 ` [PATCH 7/7] submodule--helper: remove forward declaration Glen Choo

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).