DORMANTno replies

[PATCH 3/3] Add option --only-use-symrefs to git-init-db

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:42:12
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Johannes Schindelin <redacted>

---

 init-db.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

applies-to: 5ba4aa2c83265b321ccebc0e4f24707cdd577794
7089086c9c77ac61f1e59d3382eda7b65a5dc687
diff --git a/init-db.c b/init-db.c
index b62ee72..7019109 100644
--- a/init-db.c
+++ b/init-db.c
@@ -215,7 +215,7 @@ static void create_default_files(const c
 }
 
 static const char init_db_usage[] =
-"git-init-db [--template=<template-directory>]";
+"git-init-db [--template=<template-directory>] [--only-use-symrefs]";
 
 /*
  * If you want to, you can share the DB area with any number of branches.
@@ -236,6 +236,8 @@ int main(int argc, char **argv)
 			break;
 		else if (!strncmp(arg, "--template=", 11))
 			template_dir = arg+11;
+		else if (!strcmp(arg, "--only-use-symrefs"))
+			only_use_symrefs = 1;
 		else
 			die(init_db_usage);
 	}
@@ -264,5 +266,9 @@ int main(int argc, char **argv)
 	safe_create_dir(path);
 	strcpy(path+len, "/info");
 	safe_create_dir(path);
+
+	if (only_use_symrefs)
+		git_config_set("core.SymrefsOnly", "true");
+
 	return 0;
 }
---
0.99.9.GIT
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help