From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Emily Shaffer <emilyshaffer@google.com>
Cc: Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org, gitscale@google.com
Subject: Re: Submodule UX overhaul update (was: What's cooking in git.git (Jan 2022, #07; Mon, 24))
Date: Wed, 26 Jan 2022 15:09:19 +0100 [thread overview]
Message-ID: <220126.867damfuvo.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <YfBTRuPrGGjepe+D@google.com>
On Tue, Jan 25 2022, Emily Shaffer wrote:
>> * ab/config-based-hooks-2 (2022-01-07) 17 commits
>> (merged to 'next' on 2022-01-19 at 594b6da22c)
>> + 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
>>
>> More "config-based hooks".
>>
>> Will cook in 'next'.
>> source: <cover-v6-00.17-00000000000-20211222T035755Z-avarab@gmail.com>
>>
>
> Very excited to see this one go in and looking forward to the next set!
> By the way, this reduced the number of patches Google is carrying
> internally on top of 'next' from 46 to 29. :) (All but 7 of those are
> the rest of config-based-hooks.)
Good to hear, I'm waiting on Junio to merge this down, and will then
submit the next step in the config-based hook conversion.
> It might seem slightly selfish for me to include config-based-hooks in
> the "submodules update" letter, but this is actually very important for
> submodules too - without config-based hooks, we don't have a good way to
> distribute a hook across an entire Git superproject-and-submodules
> codebase. With config-based hooks + "config.superproject" shared between
> the submodules and superproject, this becomes a very easy story :)
I'm probably missing something, not that config-based hooks aren't great
& all that, but for this specific use-case wouldn't core.hooksPath work?
I.e. to simply set that in the submodules to the superproject's
.git/hooks directory?
That could even be done with the includeIf + include.path mechanism to
apply to all projects below a certain path, which presumably is similar
to how it would work with config-based hooks.
Obviously the full config-based hook mechanism is much nicer, I just
wonder if it's something you can use as a transitory mechanism until
then.
next prev parent reply other threads:[~2022-01-26 14:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-24 19:39 What's cooking in git.git (Jan 2022, #07; Mon, 24) Junio C Hamano
2022-01-25 19:45 ` Submodule UX overhaul update (was: What's cooking in git.git (Jan 2022, #07; Mon, 24)) Emily Shaffer
2022-01-26 14:09 ` Ævar Arnfjörð Bjarmason [this message]
2022-01-26 17:27 ` Emily Shaffer
2022-01-26 15:16 ` Kaartic Sivaraam
2022-01-26 16:35 ` Atharva Raykar
2022-01-26 17:43 ` Emily Shaffer
2022-01-26 17:50 ` Glen Choo
2022-01-28 7:40 ` ps/avoid-unnecessary-hook-invocation-with-packed-refs (Was: " Patrick Steinhardt
2022-01-28 21:14 ` ps/avoid-unnecessary-hook-invocation-with-packed-refs Junio C Hamano
2022-01-31 9:50 ` flags types/names (was: ps/avoid-unnecessary-hook-invocation-with-packed-refs) Han-Wen Nienhuys
2022-01-31 17:13 ` flags types/names Junio C Hamano
2022-01-28 22:31 ` What's cooking in git.git (Jan 2022, #07; Mon, 24) brian m. carlson
2022-02-04 0:27 ` Junio C Hamano
2022-02-04 17:27 ` René Scharfe
2022-02-02 11:28 ` ab/auto-detect-zlib-compress2 (was: What's cooking in git.git (Jan 2022, #07; Mon, 24)) Ævar Arnfjörð Bjarmason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=220126.867damfuvo.gmgdl@evledraar.gmail.com \
--to=avarab@gmail.com \
--cc=emilyshaffer@google.com \
--cc=git@vger.kernel.org \
--cc=gitscale@google.com \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).