summaryrefslogtreecommitdiff
path: root/notes-merge.h
diff options
context:
space:
mode:
authorLibravatar Jonathan Tan <jonathantanmy@google.com>2022-01-18 09:47:40 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2022-01-18 13:55:53 -0800
commit399b198489a041e2842fb4b257bea5adb02d28d1 (patch)
tree3cbbac7cf1c1f46659e0b1d8f238bf51fd1ff0f4 /notes-merge.h
parentconfig: make git_config_include() static (diff)
downloadtgif-399b198489a041e2842fb4b257bea5adb02d28d1.tar.xz
config: include file if remote URL matches a glob
This is a feature that supports config file inclusion conditional on whether the repo has a remote with a URL that matches a glob. Similar to my previous work on remote-suggested hooks [1], the main motivation is to allow remote repo administrators to provide recommended configs in a way that can be consumed more easily (e.g. through a package installable by a package manager - it could, for example, contain a file to be included conditionally and a post-install script that adds the include directive to the system-wide config file). In order to do this, Git reruns the config parsing mechanism upon noticing the first URL-conditional include in order to find all remote URLs, and these remote URLs are then used to determine if that first and all subsequent includes are executed. Remote URLs are not allowed to be configued in any URL-conditionally-included file. [1] https://lore.kernel.org/git/cover.1623881977.git.jonathantanmy@google.com/ Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Acked-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'notes-merge.h')
0 files changed, 0 insertions, 0 deletions