Re: [PATCH v2 40/43] refs: allow ref backend to be set for clone
- From
Michael Haggerty <mhagger@alum.mit.edu>
- Date
- Oct 5, 2015, 11:55 UTC
- Message-ID
- <5612653F.5070502@alum.mit.edu>
- In-Reply-To
- <1443477738-32023-41-git-send-email-dturner@twopensource.com>
On 09/29/2015 12:02 AM, David Turner wrote:
Show 32 quoted lines
> Add a new option, --refs-backend-type, to allow the ref backend type to
> be set on new clones.
>
> Submodules must use the same ref backend as the parent repository, so
> we also pass the --refs-backend-type option option when cloning
> submodules.
>
> Signed-off-by: David Turner <dturner@twopensource.com>
> ---
> Documentation/git-clone.txt | 4 ++++
> builtin/clone.c | 27 +++++++++++++++++++++++++--
> builtin/submodule--helper.c | 5 ++++-
> cache.h | 1 +
> refs.c | 2 ++
> 5 files changed, 36 insertions(+), 3 deletions(-)
>
> [...]
> diff --git a/builtin/clone.c b/builtin/clone.c
> index 3e14491..d489a87 100644
> --- a/builtin/clone.c
> +++ b/builtin/clone.c
> [...]
> @@ -744,6 +762,11 @@ static void write_config(struct string_list *config)
> write_one_config, NULL) < 0)
> die("unable to write parameters to config file");
> }
> +
> + if (refs_backend_type &&
> + write_one_config("core.refs-backend-type",
> + refs_backend_type, NULL) < 0)
> + die("unable to write backend parameter to config file");
> }Our config variable names don't use separated-with-hyphens but rather wordsruntogether (though in documentation this would be written core.refsBackendType, because the actual names are case-insensitive).
> [...]
Michael
-- Michael Haggerty mhagger@alum.mit.edu