All of lore.kernel.org
 help / color / mirror / Atom feed
* [GSoC] [PATCH 0/8] submodule: convert the rest of 'add' to C
@ 2021-08-05  7:19 Atharva Raykar
  2021-08-05  7:19 ` [GSoC] [PATCH 1/8] submodule--helper: refactor resolve_relative_url() helper Atharva Raykar
                   ` (8 more replies)
  0 siblings, 9 replies; 78+ messages in thread
From: Atharva Raykar @ 2021-08-05  7:19 UTC (permalink / raw)
  To: git
  Cc: Atharva Raykar, Ævar Arnfjörð Bjarmason,
	Emily Shaffer, Jonathan Nieder, Junio C Hamano, Christian Couder,
	Shourya Shukla, Kaartic Sivaraam, Eric Sunshine,
	Prathamesh Chavan, Đoàn Trần Công Danh,
	Rafael Silva

NOTE: This series uses the change introduced by 'ar/submodule-add-config'[1]

This series completes the conversion of all the important shell logic in
'submodule add' to C, by wrapping it in a submodule--helper builtin subcommand
called 'add'.

The first 4 patches are preparatory patches. The refactors mostly involve
exposing interfaces to C that were only previously usable as shell subcommands.

Then we have a patch that translates the shell code to C, faithfully reproducing
the behaviour before the conversion.

The last 3 patches are cleanup patches. Our conversions have introduced a lot of
dead code, all of them being 'submodule--helper' subcommands that have no
further use, as we have C interfaces for these already. We remove these
subcommands.

A question about the cache API used in [PATCH 5/8]:
  What is the difference between 'read_cache()' and 'read_cache_preload()'? [2]
  Which one is more appropriate for use in 'die_on_index_match()'?

Fetch-it-Via:
git fetch https://github.com/tfidfwastaken/git submodule-helper-add-list-1

Footnotes
=========

[1] https://lore.kernel.org/git/20210801063352.50813-1-raykar.ath@gmail.com/
[2] More about this question has been detailed in this section of my blog:
http://atharvaraykar.me/gitnotes/week5#some-challenges-with-the-changes-that-are-cooking

I'll quote it here for convenience:

> Before iterating through the cache entries of the index, you need to populate
> it.
>
> There’s two functions for this: read_cache() and read_cache_preload(). I have
> used the latter in my code. The thing is, when I swap it with the former, I
> could not find any change in the behaviour of my code. They appear to function
> equivalently.
>
> I understand that the *_preload() variant takes a pathspec which preloads index
> contents that match the pathspec in parallel. I don’t know what passing NULL to
> it does. Moreover, does this imply that read_cache() loads the cache on-demand,
> ie, it does no preloading?
>
> I am not sure about what exactly are their differences, and when is one variant
> preferred over the other.

Atharva Raykar (8):
  submodule--helper: refactor resolve_relative_url() helper
  submodule--helper: remove repeated code in sync_submodule()
  dir: libify and export helper functions from clone.c
  submodule--helper: remove constness of sm_path
  submodule--helper: convert the bulk of cmd_add() to C
  submodule--helper: remove add-clone subcommand
  submodule--helper: remove add-config subcommand
  submodule--helper: remove resolve-relative-url subcommand

 builtin/clone.c             | 118 +-------------
 builtin/submodule--helper.c | 304 +++++++++++++++++++-----------------
 dir.c                       | 114 ++++++++++++++
 dir.h                       |   3 +
 git-submodule.sh            |  96 +-----------
 5 files changed, 278 insertions(+), 357 deletions(-)

-- 
2.32.0


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

end of thread, other threads:[~2021-09-08  0:31 UTC | newest]

Thread overview: 78+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-05  7:19 [GSoC] [PATCH 0/8] submodule: convert the rest of 'add' to C Atharva Raykar
2021-08-05  7:19 ` [GSoC] [PATCH 1/8] submodule--helper: refactor resolve_relative_url() helper Atharva Raykar
2021-08-05  7:19 ` [GSoC] [PATCH 2/8] submodule--helper: remove repeated code in sync_submodule() Atharva Raykar
2021-08-06  0:53   ` Đoàn Trần Công Danh
2021-08-06  9:06     ` Christian Couder
2021-08-06 10:06       ` Atharva Raykar
2021-08-06 16:21       ` Junio C Hamano
2021-08-05  7:19 ` [GSoC] [PATCH 3/8] dir: libify and export helper functions from clone.c Atharva Raykar
2021-08-05  7:19 ` [GSoC] [PATCH 4/8] submodule--helper: remove constness of sm_path Atharva Raykar
2021-08-05  7:19 ` [GSoC] [PATCH 5/8] submodule--helper: convert the bulk of cmd_add() to C Atharva Raykar
2021-08-05  7:19 ` [GSoC] [PATCH 6/8] submodule--helper: remove add-clone subcommand Atharva Raykar
2021-08-05  7:19 ` [GSoC] [PATCH 7/8] submodule--helper: remove add-config subcommand Atharva Raykar
2021-08-05  7:19 ` [GSoC] [PATCH 8/8] submodule--helper: remove resolve-relative-url subcommand Atharva Raykar
2021-08-05  7:40 ` [GSoC] [PATCH v2 0/9] submodule: convert the rest of 'add' to C Atharva Raykar
2021-08-05  7:40   ` [GSoC] [PATCH v2 1/9] submodule--helper: add options for compute_submodule_clone_url() Atharva Raykar
2021-08-05 20:05     ` Junio C Hamano
2021-08-05  7:40   ` [GSoC] [PATCH v2 2/9] submodule--helper: refactor resolve_relative_url() helper Atharva Raykar
2021-08-05 20:13     ` Junio C Hamano
2021-08-05  7:40   ` [GSoC] [PATCH v2 3/9] submodule--helper: remove repeated code in sync_submodule() Atharva Raykar
2021-08-05 20:20     ` Junio C Hamano
2021-08-05  7:40   ` [GSoC] [PATCH v2 4/9] dir: libify and export helper functions from clone.c Atharva Raykar
2021-08-05 20:37     ` Junio C Hamano
2021-08-06 11:12       ` Atharva Raykar
2021-08-06 16:36         ` Junio C Hamano
2021-08-07  7:15           ` Atharva Raykar
2021-08-05  7:40   ` [GSoC] [PATCH v2 5/9] submodule--helper: remove constness of sm_path Atharva Raykar
2021-08-05 20:40     ` Junio C Hamano
2021-08-06 11:16       ` Atharva Raykar
2021-08-05  7:40   ` [GSoC] [PATCH v2 6/9] submodule--helper: convert the bulk of cmd_add() to C Atharva Raykar
2021-08-06  1:14     ` Đoàn Trần Công Danh
2021-08-06 11:33       ` Atharva Raykar
2021-08-05  7:40   ` [GSoC] [PATCH v2 7/9] submodule--helper: remove add-clone subcommand Atharva Raykar
2021-08-05  7:40   ` [GSoC] [PATCH v2 8/9] submodule--helper: remove add-config subcommand Atharva Raykar
2021-08-05  7:40   ` [GSoC] [PATCH v2 9/9] submodule--helper: remove resolve-relative-url subcommand Atharva Raykar
2021-08-06 12:01   ` [GSoC] [PATCH v3 0/8] submodule: convert the rest of 'add' to C Atharva Raykar
2021-08-06 12:01     ` [GSoC] [PATCH v3 1/8] submodule--helper: add options for compute_submodule_clone_url() Atharva Raykar
2021-08-06 12:01     ` [GSoC] [PATCH v3 2/8] submodule--helper: refactor resolve_relative_url() helper Atharva Raykar
2021-08-06 12:01     ` [GSoC] [PATCH v3 3/8] submodule--helper: remove repeated code in sync_submodule() Atharva Raykar
2021-08-06 12:01     ` [GSoC] [PATCH v3 4/8] dir: libify and export helper functions from clone.c Atharva Raykar
2021-08-06 12:01     ` [GSoC] [PATCH v3 5/8] submodule--helper: convert the bulk of cmd_add() to C Atharva Raykar
2021-08-06 12:01     ` [GSoC] [PATCH v3 6/8] submodule--helper: remove add-clone subcommand Atharva Raykar
2021-08-06 12:01     ` [GSoC] [PATCH v3 7/8] submodule--helper: remove add-config subcommand Atharva Raykar
2021-08-06 12:01     ` [GSoC] [PATCH v3 8/8] submodule--helper: remove resolve-relative-url subcommand Atharva Raykar
2021-08-07  7:16     ` [GSoC] [PATCH v4 0/8] submodule: convert the rest of 'add' to C Atharva Raykar
2021-08-07  7:16       ` [GSoC] [PATCH v4 1/8] submodule--helper: add options for compute_submodule_clone_url() Atharva Raykar
2021-08-08 17:41         ` Kaartic Sivaraam
2021-08-08 18:26           ` Kaartic Sivaraam
2021-08-09  7:29             ` Atharva Raykar
2021-08-09  8:47               ` Atharva Raykar
2021-08-10 17:36                 ` Kaartic Sivaraam
2021-08-07  7:16       ` [GSoC] [PATCH v4 2/8] submodule--helper: refactor resolve_relative_url() helper Atharva Raykar
2021-08-07  7:16       ` [GSoC] [PATCH v4 3/8] submodule--helper: remove repeated code in sync_submodule() Atharva Raykar
2021-08-08 19:00         ` Kaartic Sivaraam
2021-08-09  7:36           ` Atharva Raykar
2021-08-07  7:16       ` [GSoC] [PATCH v4 4/8] dir: libify and export helper functions from clone.c Atharva Raykar
2021-08-08 19:23         ` Kaartic Sivaraam
2021-08-09  8:02           ` Atharva Raykar
2021-08-10 17:53             ` Kaartic Sivaraam
2021-08-10 21:27               ` Junio C Hamano
2021-08-11 10:25               ` Atharva Raykar
2021-08-07  7:16       ` [GSoC] [PATCH v4 5/8] submodule--helper: convert the bulk of cmd_add() to C Atharva Raykar
2021-08-07  7:16       ` [GSoC] [PATCH v4 6/8] submodule--helper: remove add-clone subcommand Atharva Raykar
2021-08-07  7:16       ` [GSoC] [PATCH v4 7/8] submodule--helper: remove add-config subcommand Atharva Raykar
2021-08-07  7:16       ` [GSoC] [PATCH v4 8/8] submodule--helper: remove resolve-relative-url subcommand Atharva Raykar
2021-08-08 18:01       ` [GSoC] [PATCH v4 0/8] submodule: convert the rest of 'add' to C Kaartic Sivaraam
2021-08-10 11:46       ` [GSoC] [PATCH v5 0/9] " Atharva Raykar
2021-08-10 11:46         ` [GSoC] [PATCH v5 1/9] submodule--helper: add options for compute_submodule_clone_url() Atharva Raykar
2021-08-11  6:44           ` Bagas Sanjaya
2021-08-11 10:30             ` Atharva Raykar
2021-08-10 11:46         ` [GSoC] [PATCH v5 2/9] submodule--helper: refactor resolve_relative_url() helper Atharva Raykar
2021-08-10 11:46         ` [GSoC] [PATCH v5 3/9] submodule--helper: remove repeated code in sync_submodule() Atharva Raykar
2021-08-10 11:46         ` [GSoC] [PATCH v5 4/9] dir: libify and export helper functions from clone.c Atharva Raykar
2021-08-10 11:46         ` [GSoC] [PATCH v5 5/9] submodule--helper: convert the bulk of cmd_add() to C Atharva Raykar
2021-08-10 11:46         ` [GSoC] [PATCH v5 6/9] submodule--helper: remove add-clone subcommand Atharva Raykar
2021-08-10 11:46         ` [GSoC] [PATCH v5 7/9] submodule--helper: remove add-config subcommand Atharva Raykar
2021-08-10 11:46         ` [GSoC] [PATCH v5 8/9] submodule--helper: remove resolve-relative-url subcommand Atharva Raykar
2021-08-10 11:46         ` [GSoC] [PATCH v5 9/9] submodule--helper: rename compute_submodule_clone_url() Atharva Raykar
2021-09-08  0:31         ` [GSoC] [PATCH v5 0/9] submodule: convert the rest of 'add' to C Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.