{"thread":{"id":"27441","subject":"[PATCH] Fix usage of git-init and git-init-db documentation","startedAt":"2011-05-24T14:41:53Z","lastAt":"2011-05-24T16:40:32Z","messageCount":5,"participants":["Marc Pegon","Junio C Hamano","Nguyen Thai Ngoc Duy"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"168574","messageId":"1306248113-19948-1-git-send-email-pegon.marc@gmail.com","threadId":"27441","inReplyTo":null,"subject":"[PATCH] Fix usage of git-init and git-init-db documentation","fromName":"Marc Pegon","fromEmail":"pegon.marc@gmail.com","sentAt":"2011-05-24T14:41:53Z","receivedAt":"2011-05-24T14:41:53Z","isPatch":true,"sender":{"key":"pegon.marc@gmail.com","avatar":null},"body":"These were not updated in commit b57fb80a7d7 (init, clone: support --separate-git-dir for .git file)\n\nSigned-off-by: Marc Pegon <pegon.marc@gmail.com>\n---\n Documentation/git-init-db.txt |    4 +++-\n builtin/init-db.c             |    4 +++-\n 2 files changed, 6 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-init-db.txt b/Documentation/git-init-db.txt\nindex 2c4c716..0a17450 100644\n--- a/Documentation/git-init-db.txt\n+++ b/Documentation/git-init-db.txt\n@@ -8,7 +8,9 @@ git-init-db - Creates an empty git repository\n \n SYNOPSIS\n --------\n-'git init-db' [-q | --quiet] [--bare] [--template=<template_directory>] [--shared[=<permissions>]]\n+'git init-db' [-q | --quiet] [--bare] [--template=<template_directory>]\n+\t  [--separate-git-dir|-L <git dir>]\n+\t  [--shared[=<permissions>]] [directory]\n \n \n DESCRIPTION\ndiff --git a/builtin/init-db.c b/builtin/init-db.c\nindex b7370d9..0a71378 100644\n--- a/builtin/init-db.c\n+++ b/builtin/init-db.c\n@@ -463,7 +463,9 @@ static int shared_callback(const struct option *opt, const char *arg, int unset)\n }\n \n static const char *const init_db_usage[] = {\n-\t\"git init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared[=<permissions>]] [directory]\",\n+\t\"git init [-q | --quiet] [--bare] [--template=<template_directory>]\\n\"\n+\t\"[--separate-git-dir|-L <git dir>]\\n\",\n+\t\"[--shared[=<permissions>]] [directory]\",\n \tNULL\n };\n \n-- \n1.7.1\n"},{"id":"168577","messageId":"7voc2s850z.fsf@alter.siamese.dyndns.org","threadId":"27441","inReplyTo":"1306248113-19948-1-git-send-email-pegon.marc@gmail.com","subject":"Re: [PATCH] Fix usage of git-init and git-init-db documentation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-05-24T15:58:04Z","receivedAt":"2011-05-24T15:58:04Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Marc Pegon <pegon.marc@gmail.com> writes:\n\n> These were not updated in commit b57fb80a7d7 (init, clone: support --separate-git-dir for .git file)\n\nToo long a line?\n\nI think \"Fix usage\" on the title can be clarified a lot to make the entry\nfor this commit in the \"shortlog\" output meaningful.\n\n> Signed-off-by: Marc Pegon <pegon.marc@gmail.com>\n> ---\n> ...\n>  SYNOPSIS\n>  --------\n> -'git init-db' [-q | --quiet] [--bare] [--template=<template_directory>] [--shared[=<permissions>]]\n> +'git init-db' [-q | --quiet] [--bare] [--template=<template_directory>]\n> +\t  [--separate-git-dir|-L <git dir>]\n> +\t  [--shared[=<permissions>]] [directory]\n\nThis is wrong, isn't it?  It looks as if you can give \"--separate-git-dir\"\n(without anything else), or you can give \"-L <dir>\".\n\nBy the way, the change seems to have slipped in while I wasn't paying too\nmuch attention, but who came up with this silly capital 'L'?  As it hasn't\nbeen advertised in the documentation (lucky us), it probably is not too\nlate to remove it.\n"},{"id":"168579","messageId":"BANLkTingh__Yxy_rEM2mV6wB453OdarrwA@mail.gmail.com","threadId":"27441","inReplyTo":"7voc2s850z.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Fix usage of git-init and git-init-db documentation","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2011-05-24T16:04:31Z","receivedAt":"2011-05-24T16:04:31Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Tue, May 24, 2011 at 10:58 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> By the way, the change seems to have slipped in while I wasn't paying too\n> much attention, but who came up with this silly capital 'L'?\n\nWell, probably.. me.\n\n> As it hasn't been advertised in the documentation (lucky us), it probably is not too\n> late to remove it.\n\nNo objection if you remove it. I was probably thinking of git\n\"symlink\" but the traditional -l was taken, so -L.\n-- \nDuy\n"},{"id":"168581","messageId":"7vfwo483qe.fsf@alter.siamese.dyndns.org","threadId":"27441","inReplyTo":"BANLkTingh__Yxy_rEM2mV6wB453OdarrwA@mail.gmail.com","subject":"Re: [PATCH] Fix usage of git-init and git-init-db documentation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-05-24T16:26:01Z","receivedAt":"2011-05-24T16:26:01Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:\n\n>> As it hasn't been advertised in the documentation (lucky us), it probably is not too\n>> late to remove it.\n>\n> No objection if you remove it. I was probably thinking of git\n> \"symlink\" but the traditional -l was taken, so -L.\n\nI do not care deeply enough to remove it myself, but it is a bad taste to\ngive a short variant to an option that hasn't yet proven to be frequently\nuseful, especially to a command whose other command has no short variant.\n"},{"id":"168584","messageId":"20110524164032.GA2059@do","threadId":"27441","inReplyTo":"7vfwo483qe.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Fix usage of git-init and git-init-db documentation","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2011-05-24T16:40:32Z","receivedAt":"2011-05-24T16:40:32Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Tue, May 24, 2011 at 09:26:01AM -0700, Junio C Hamano wrote:\n> Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:\n> \n> >> As it hasn't been advertised in the documentation (lucky us), it probably is not too\n> >> late to remove it.\n> >\n> > No objection if you remove it. I was probably thinking of git\n> > \"symlink\" but the traditional -l was taken, so -L.\n> \n> I do not care deeply enough to remove it myself, but it is a bad taste to\n> give a short variant to an option that hasn't yet proven to be frequently\n> useful, especially to a command whose other command has no short variant.\n\nJust had a look at it. The option is documented in init and\nclone. init-db is deprecated so I did not bother. I hope this obscure\nfeature has not been widely used yet and this patch can still apply\n\n-- 8< --\nSubject: [PATCH] init/clone: remove short option -L\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n Documentation/git-clone.txt |    3 +--\n Documentation/git-init.txt  |    3 +--\n builtin/clone.c             |    2 +-\n builtin/init-db.c           |    2 +-\n t/t0001-init.sh             |    2 +-\n 5 files changed, 5 insertions(+), 7 deletions(-)\n\ndiff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt\nindex 86eb4c9..b093e45 100644\n--- a/Documentation/git-clone.txt\n+++ b/Documentation/git-clone.txt\n@@ -12,7 +12,7 @@ SYNOPSIS\n 'git clone' [--template=<template_directory>]\n \t  [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]\n \t  [-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>]\n-\t  [--separate-git-dir|-L <git dir>]\n+\t  [--separate-git-dir <git dir>]\n \t  [--depth <depth>] [--recursive|--recurse-submodules] [--] <repository>\n \t  [<directory>]\n \n@@ -177,7 +177,6 @@ objects from the source repository into a pack in the cloned repository.\n \trepository does not have a worktree/checkout (i.e. if any of\n \t`--no-checkout`/`-n`, `--bare`, or `--mirror` is given)\n \n--L=<git dir>::\n --separate-git-dir=<git dir>::\n \tInstead of placing the cloned repository where it is supposed\n \tto be, place the cloned repository at the specified directory,\ndiff --git a/Documentation/git-init.txt b/Documentation/git-init.txt\nindex 58cd011..f2777a7 100644\n--- a/Documentation/git-init.txt\n+++ b/Documentation/git-init.txt\n@@ -9,7 +9,7 @@ git-init - Create an empty git repository or reinitialize an existing one\n SYNOPSIS\n --------\n 'git init' [-q | --quiet] [--bare] [--template=<template_directory>]\n-\t  [--separate-git-dir|-L <git dir>]\n+\t  [--separate-git-dir <git dir>]\n \t  [--shared[=<permissions>]] [directory]\n \n \n@@ -54,7 +54,6 @@ current working directory.\n Specify the directory from which templates will be used.  (See the \"TEMPLATE\n DIRECTORY\" section below.)\n \n--L=<git dir>::\n --separate-git-dir=<git dir>::\n \n Instead of initializing the repository where it is supposed to be,\ndiff --git a/builtin/clone.c b/builtin/clone.c\nindex 49c838f..f579794 100644\n--- a/builtin/clone.c\n+++ b/builtin/clone.c\n@@ -81,7 +81,7 @@ static struct option builtin_clone_options[] = {\n \t\t   \"path to git-upload-pack on the remote\"),\n \tOPT_STRING(0, \"depth\", &option_depth, \"depth\",\n \t\t    \"create a shallow clone of that depth\"),\n-\tOPT_STRING('L', \"separate-git-dir\", &real_git_dir, \"gitdir\",\n+\tOPT_STRING(0, \"separate-git-dir\", &real_git_dir, \"gitdir\",\n \t\t   \"separate git dir from working tree\"),\n \n \tOPT_END()\ndiff --git a/builtin/init-db.c b/builtin/init-db.c\nindex ba13a54..025aa47 100644\n--- a/builtin/init-db.c\n+++ b/builtin/init-db.c\n@@ -490,7 +490,7 @@ int cmd_init_db(int argc, const char **argv, const char *prefix)\n \t\t\t\"specify that the git repository is to be shared amongst several users\",\n \t\t\tPARSE_OPT_OPTARG | PARSE_OPT_NONEG, shared_callback, 0},\n \t\tOPT_BIT('q', \"quiet\", &flags, \"be quiet\", INIT_DB_QUIET),\n-\t\tOPT_STRING('L', \"separate-git-dir\", &real_git_dir, \"gitdir\",\n+\t\tOPT_STRING(0, \"separate-git-dir\", &real_git_dir, \"gitdir\",\n \t\t\t   \"separate git dir from working tree\"),\n \t\tOPT_END()\n \t};\ndiff --git a/t/t0001-init.sh b/t/t0001-init.sh\nindex 8106af8..ad66410 100755\n--- a/t/t0001-init.sh\n+++ b/t/t0001-init.sh\n@@ -409,7 +409,7 @@ test_expect_success SYMLINKS 're-init to move gitdir symlink' '\n \tcd newdir &&\n \tmv .git here &&\n \tln -s here .git &&\n-\tgit init -L ../realgitdir\n+\tgit init --separate-git-dir ../realgitdir\n \t) &&\n \techo \"gitdir: `pwd`/realgitdir\" >expected &&\n \ttest_cmp expected newdir/.git &&\n-- \n1.7.4.74.g639db\n\n-- 8< --\n-- \nDuy\n"}]}