Re: [PATCH 3/3] config: add core.sharedconfig
2010/12/9 Nguyễn Thái Ngọc Duy <pclouds@gmail.com>:
Show 34 quoted lines
> core.sharedconfig can take anything that resolves to a blob.
> $GIT_DIR/config will override the shared config. Nested shared
> config is not allowed.
>
> No protection is provided. It's up to the project to maintain good
> config. The config could be in a separate branch that only a few
> people are allowed to push, for example. To be safest, just put SHA-1
> there.
>
> git-fsck and git-prune should learn about this key and protect it from
> being pruned.
>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
> Hopefully nobody sets core.sharedconfig = :path/to/config or similar
>
> And I should not open $GIT_DIR/config twice. Well, it does not hurt
> much.
>
> cache.h | 1 +
> config.c | 14 ++++++++++++++
> environment.c | 1 +
> 3 files changed, 16 insertions(+), 0 deletions(-)
>
> diff --git a/cache.h b/cache.h
> index e83bc2d..e91ce35 100644
> --- a/cache.h
> +++ b/cache.h
> @@ -559,6 +559,7 @@ extern int read_replace_refs;
> extern int fsync_object_files;
> extern int core_preload_index;
> extern int core_apply_sparse_checkout;
> +extern const char *core_shared_config;
>
Why you need to export this string? Isn't it used only in config.c?