git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Submodules UX overhaul update (was: What's cooking in git.git (Nov 2021, #06; Wed, 24))

From
Emily Shaffer <emilyshaffer@google.com>
Date
Nov 29, 2021, 22:30 UTC
Message-ID
<YaVUlYVa5ZWCIInd@google.com>
In-Reply-To
<xmqqlf1caica.fsf@gitster.g>
On Wed, Nov 24, 2021 at 09:56:53PM -0800, Junio C Hamano wrote:
Show 18 quoted lines
> --------------------------------------------------
> [Stalled]
> 
> * ar/submodule-update (2021-10-13) 9 commits
>  . submodule--helper: rename helper functions
>  . submodule--helper: remove unused helpers
>  . submodule: move core cmd_update() logic to C
>  . submodule--helper: run update using child process struct
>  . submodule--helper: allow setting superprefix for init_submodule()
>  . submodule--helper: refactor get_submodule_displaypath()
>  . submodule--helper: rename helpers for update-clone
>  . submodule--helper: get remote names from any repository
>  . submodule--helper: split up ensure_core_worktree()
> 
>  Rewrite of "git submodule update" in C.
> 
>  Kicked out of 'seen' to make room for es/superproject-aware-submodules
>  which is among the topics this topic stomps on.
Update on es/superproject-aware-submodules to follow.
Show 14 quoted lines
> --------------------------------------------------
> [Cooking]
> 
> * gc/remote-with-fewer-static-global-variables (2021-11-18) 5 commits
>  - remote: die if branch is not found in repository
>  - remote: remove the_repository->remote_state from static methods
>  - remote: use remote_state parameter internally
>  - remote: move static variables into per-repository struct
>  - t5516: add test case for pushing remote refspecs
> 
>  Code clean-up to eventually allow information on remotes defined
>  for an arbitrary repository to be read.
> 
>  Will merge to 'next'.
Thanks.
Show 21 quoted lines
> * ab/config-based-hooks-2 (2021-11-24) 18 commits
>  - run-command: remove old run_hook_{le,ve}() hook API
>  - receive-pack: convert push-to-checkout hook to hook.h
>  - read-cache: convert post-index-change to use hook.h
>  - commit: convert {pre-commit,prepare-commit-msg} hook to hook.h
>  - git-p4: use 'git hook' to run hooks
>  - send-email: use 'git hook run' for 'sendemail-validate'
>  - git hook run: add an --ignore-missing flag
>  - hooks: convert worktree 'post-checkout' hook to hook library
>  - hooks: convert non-worktree 'post-checkout' hook to hook library
>  - merge: convert post-merge to use hook.h
>  - am: convert applypatch-msg to use hook.h
>  - rebase: convert pre-rebase to use hook.h
>  - hook API: add a run_hooks_l() wrapper
>  - am: convert {pre,post}-applypatch to use hook.h
>  - gc: use hook library for pre-auto-gc hook
>  - hook API: add a run_hooks() wrapper
>  - hook: add 'run' subcommand
>  - Merge branch 'ab/config-based-hooks-1' into ab/config-based-hooks-2
> 
>  More "config-based hooks".

I think I haven't looked at the update on 2021-11-01, so I probably owe a review. Other reviews welcome, since I have bias :)

Show 6 quoted lines
> * js/branch-track-inherit (2021-11-18) 1 commit
>  - branch: add flags and config to inherit tracking
> 
>  "git -c branch.autosetupmerge=inherit branch new old" makes "new"
>  to have the same upstream as the "old" branch, instead of marking
>  "old" itself as its upstream.

We're hoping this one will pave the way for a user to run simply 'git push' from the superproject and have all submodules push to the correct branch, even if it's different from the superproject's branch.

Show 9 quoted lines
> * es/superproject-aware-submodules (2021-11-18) 5 commits
>  - submodule: use config to find superproject worktree
>  - submodule: record superproject gitdir during 'update'
>  - submodule: record superproject gitdir during absorbgitdirs
>  - introduce submodule.superprojectGitDir record
>  - t7400-submodule-basic: modernize inspect() helper
> 
>  A configuration variable in a submodule points at the location of
>  the superproject it is bound to (RFC).

Needs another reroll, but there is some quibbling over whether it makes sense for this series to exist at all (or whether to just search the filesystem every time we think we might be in a submodule). Ævar asked for some benchmarking, I'll see if I can find some time.

Missing from this list, a few things we're still worried about:

Glen Choo: implement branch --recurse-submodules https://lore.kernel.org/git/20211122223252.19922-1-chooglen%40google.com

An example implementation of 'git branch --recurse-submodules' in line with the previously discussed RFC.

Jonathan Tan: Conditional config includes based on remote URL https://patchwork.kernel.org/project/git/patch/cover.1637020610.git.jonathantanmy%40google.com

This one should allow users to distribute config-based hooks more easily in managed environments where /etc/gitconfig is distributed to all users, or by package manager via clever postinstall scripts.

 - Emily
Previous: Junio C Hamano
Message 7 of 7 in “What's cooking in git.git (Nov 2021, #06; Wed, 24)”
  1. Junio C HamanoNov 25, 2021
  2. Philip OakleyNov 25, 2021
  3. bc/require-c99 + jc/c99-var-decl-in-for-loop (was: What's cooking in git.git (Nov 2021, #06; Wed, 24))Ævar Arnfjörð Bjarmason, Nov 26, 2021
  4. Junio C HamanoNov 29, 2021
  5. vd/sparse-reset (Was: Re: What's cooking in git.git (Nov 2021, #06; Wed, 24))Victoria Dye, Nov 29, 2021
  6. Junio C HamanoNov 29, 2021
  7. Submodules UX overhaul update (was: What's cooking in git.git (Nov 2021, #06; Wed, 24))Emily Shaffer, Nov 29, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.