Skip to content

RFC Unset the submodule URL in the superproject when no longer needed

Stefan Beller git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest7 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7t7410: update to new stylet/t7410-submodule-checkout-to.sh+58 -411 reply
2/7builtin/submodule--helper: remove stray new linebuiltin/submodule--helper.c+0 -10 replies
3/7submodule: is_submodule_active to differentiate between new and old modesubmodule.c submodule.h+7 -43 replies
4/7submodule sync: omit setting submodule URL in config if possiblebuiltin/submodule--helper.c+9 -50 replies
5/7submodule--helper: factor out allocation of callback cookiebuiltin/submodule--helper.c+9 -70 replies
6/7submodule--helper, update_clone: store index to update_clone instead of cebuiltin/submodule--helper.c+19 -120 replies
7/7builtin/submodule--helper: unset submodule url if possiblebuiltin/submodule--helper.c t/t5526-fetch-submodules.sh t/t7406-submodule-update.sh +1 more+32 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/7] Unset the submodule URL in the superproject when no longer needed

This is available as

git fetch //github.com/stefanbeller/git unsetsubmoduleurl

and was hinted at in
https://public-inbox.org/git/CAGZ79kYfoK9hfXM2-VMAZLPpqBOFQYKtyYuYJb8twzz6Oz5ymQ@mail.gmail.com/

Originally we have had the url in the config, (a) that we can change the URLs after the "git submodule init" and "git submodule update" step that actually clones the submodule if not present and much more importantly (b) to know which submodule "was initialized/active".

Now that we have the submodule.active or even submodule.<name>.active flags, we do not need (b) any more. So the URL turns into a useless piece of cruft that just is unneeded and might confuse the user.

Opinions?

Thanks,
Stefan

Stefan Beller (7):
t7410: update to new style
builtin/submodule--helper: remove stray new line
submodule: is_submodule_active to differentiate between new and old
mode
submodule sync: omit setting submodule URL in config if possible
submodule--helper: factor out allocation of callback cookie submodule--helper, update_clone: store index to update_clone instead
of ce
builtin/submodule--helper: unset submodule url if possible

 builtin/submodule--helper.c      | 82 ++++++++++++++++++--------
 submodule.c                      |  5 +-
 submodule.h                      |  6 ++
 t/t5526-fetch-submodules.sh      |  2 +-
 t/t7406-submodule-update.sh      |  8 +++
 t/t7410-submodule-checkout-to.sh | 99 +++++++++++++++++++-------------
 6 files changed, 131 insertions(+), 71 deletions(-)
Signature · 1 line
2.18.0.265.g16de1b435c9.dirty