{"thread":{"id":"2533","subject":"[PATCH 3/3] Add option --only-use-symrefs to git-init-db","startedAt":"2005-11-15T21:37:05Z","lastAt":"2005-11-15T21:37:05Z","messageCount":1,"participants":["Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"11933","messageId":"Pine.LNX.4.63.0511152236410.2152@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"2533","inReplyTo":null,"subject":"[PATCH 3/3] Add option --only-use-symrefs to git-init-db","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2005-11-15T21:37:05Z","receivedAt":"2005-11-15T21:37:05Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nSigned-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n\n---\n\n init-db.c |    8 +++++++-\n 1 files changed, 7 insertions(+), 1 deletions(-)\n\napplies-to: 5ba4aa2c83265b321ccebc0e4f24707cdd577794\n7089086c9c77ac61f1e59d3382eda7b65a5dc687\ndiff --git a/init-db.c b/init-db.c\nindex b62ee72..7019109 100644\n--- a/init-db.c\n+++ b/init-db.c\n@@ -215,7 +215,7 @@ static void create_default_files(const c\n }\n \n static const char init_db_usage[] =\n-\"git-init-db [--template=<template-directory>]\";\n+\"git-init-db [--template=<template-directory>] [--only-use-symrefs]\";\n \n /*\n  * If you want to, you can share the DB area with any number of branches.\n@@ -236,6 +236,8 @@ int main(int argc, char **argv)\n \t\t\tbreak;\n \t\telse if (!strncmp(arg, \"--template=\", 11))\n \t\t\ttemplate_dir = arg+11;\n+\t\telse if (!strcmp(arg, \"--only-use-symrefs\"))\n+\t\t\tonly_use_symrefs = 1;\n \t\telse\n \t\t\tdie(init_db_usage);\n \t}\n@@ -264,5 +266,9 @@ int main(int argc, char **argv)\n \tsafe_create_dir(path);\n \tstrcpy(path+len, \"/info\");\n \tsafe_create_dir(path);\n+\n+\tif (only_use_symrefs)\n+\t\tgit_config_set(\"core.SymrefsOnly\", \"true\");\n+\n \treturn 0;\n }\n---\n0.99.9.GIT\n"}]}