Thread (82 messages) flat view 82 messages, 7 authors, 2016-06-15

Re: [PATCH v2 40/43] refs: allow ref backend to be set for clone

From: David Turner <hidden>
Date: 2016-06-15 23:06:46

On Mon, 2015-10-05 at 13:55 +0200, Michael Haggerty wrote:
On 09/29/2015 12:02 AM, David Turner wrote:
quoted
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 <redacted>
---
 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).
Will fix, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help