* [PATCH] Fix usage of git-init and git-init-db documentation
@ 2011-05-24 14:41 Marc Pegon
2011-05-24 15:58 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: Marc Pegon @ 2011-05-24 14:41 UTC (permalink / raw)
To: git; +Cc: gitster, Marc Pegon
These were not updated in commit b57fb80a7d7 (init, clone: support --separate-git-dir for .git file)
Signed-off-by: Marc Pegon <pegon.marc@gmail.com>
---
Documentation/git-init-db.txt | 4 +++-
builtin/init-db.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-init-db.txt b/Documentation/git-init-db.txt
index 2c4c716..0a17450 100644
--- a/Documentation/git-init-db.txt
+++ b/Documentation/git-init-db.txt
@@ -8,7 +8,9 @@ git-init-db - Creates an empty git repository
SYNOPSIS
--------
-'git init-db' [-q | --quiet] [--bare] [--template=<template_directory>] [--shared[=<permissions>]]
+'git init-db' [-q | --quiet] [--bare] [--template=<template_directory>]
+ [--separate-git-dir|-L <git dir>]
+ [--shared[=<permissions>]] [directory]
DESCRIPTION
diff --git a/builtin/init-db.c b/builtin/init-db.c
index b7370d9..0a71378 100644
--- a/builtin/init-db.c
+++ b/builtin/init-db.c
@@ -463,7 +463,9 @@ static int shared_callback(const struct option *opt, const char *arg, int unset)
}
static const char *const init_db_usage[] = {
- "git init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared[=<permissions>]] [directory]",
+ "git init [-q | --quiet] [--bare] [--template=<template_directory>]\n"
+ "[--separate-git-dir|-L <git dir>]\n",
+ "[--shared[=<permissions>]] [directory]",
NULL
};
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix usage of git-init and git-init-db documentation
2011-05-24 14:41 [PATCH] Fix usage of git-init and git-init-db documentation Marc Pegon
@ 2011-05-24 15:58 ` Junio C Hamano
2011-05-24 16:04 ` Nguyen Thai Ngoc Duy
0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2011-05-24 15:58 UTC (permalink / raw)
To: Marc Pegon; +Cc: git
Marc Pegon <pegon.marc@gmail.com> writes:
> These were not updated in commit b57fb80a7d7 (init, clone: support --separate-git-dir for .git file)
Too long a line?
I think "Fix usage" on the title can be clarified a lot to make the entry
for this commit in the "shortlog" output meaningful.
> Signed-off-by: Marc Pegon <pegon.marc@gmail.com>
> ---
> ...
> SYNOPSIS
> --------
> -'git init-db' [-q | --quiet] [--bare] [--template=<template_directory>] [--shared[=<permissions>]]
> +'git init-db' [-q | --quiet] [--bare] [--template=<template_directory>]
> + [--separate-git-dir|-L <git dir>]
> + [--shared[=<permissions>]] [directory]
This is wrong, isn't it? It looks as if you can give "--separate-git-dir"
(without anything else), or you can give "-L <dir>".
By the way, the change seems to have slipped in while I wasn't paying too
much attention, but who came up with this silly capital 'L'? As it hasn't
been advertised in the documentation (lucky us), it probably is not too
late to remove it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix usage of git-init and git-init-db documentation
2011-05-24 15:58 ` Junio C Hamano
@ 2011-05-24 16:04 ` Nguyen Thai Ngoc Duy
2011-05-24 16:26 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: Nguyen Thai Ngoc Duy @ 2011-05-24 16:04 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Marc Pegon, git
On Tue, May 24, 2011 at 10:58 PM, Junio C Hamano <gitster@pobox.com> wrote:
> By the way, the change seems to have slipped in while I wasn't paying too
> much attention, but who came up with this silly capital 'L'?
Well, probably.. me.
> As it hasn't been advertised in the documentation (lucky us), it probably is not too
> late to remove it.
No objection if you remove it. I was probably thinking of git
"symlink" but the traditional -l was taken, so -L.
--
Duy
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix usage of git-init and git-init-db documentation
2011-05-24 16:04 ` Nguyen Thai Ngoc Duy
@ 2011-05-24 16:26 ` Junio C Hamano
2011-05-24 16:40 ` Nguyen Thai Ngoc Duy
0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2011-05-24 16:26 UTC (permalink / raw)
To: Nguyen Thai Ngoc Duy; +Cc: Marc Pegon, git
Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
>> As it hasn't been advertised in the documentation (lucky us), it probably is not too
>> late to remove it.
>
> No objection if you remove it. I was probably thinking of git
> "symlink" but the traditional -l was taken, so -L.
I do not care deeply enough to remove it myself, but it is a bad taste to
give a short variant to an option that hasn't yet proven to be frequently
useful, especially to a command whose other command has no short variant.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix usage of git-init and git-init-db documentation
2011-05-24 16:26 ` Junio C Hamano
@ 2011-05-24 16:40 ` Nguyen Thai Ngoc Duy
0 siblings, 0 replies; 5+ messages in thread
From: Nguyen Thai Ngoc Duy @ 2011-05-24 16:40 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Marc Pegon, git
On Tue, May 24, 2011 at 09:26:01AM -0700, Junio C Hamano wrote:
> Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
>
> >> As it hasn't been advertised in the documentation (lucky us), it probably is not too
> >> late to remove it.
> >
> > No objection if you remove it. I was probably thinking of git
> > "symlink" but the traditional -l was taken, so -L.
>
> I do not care deeply enough to remove it myself, but it is a bad taste to
> give a short variant to an option that hasn't yet proven to be frequently
> useful, especially to a command whose other command has no short variant.
Just had a look at it. The option is documented in init and
clone. init-db is deprecated so I did not bother. I hope this obscure
feature has not been widely used yet and this patch can still apply
-- 8< --
Subject: [PATCH] init/clone: remove short option -L
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
Documentation/git-clone.txt | 3 +--
Documentation/git-init.txt | 3 +--
builtin/clone.c | 2 +-
builtin/init-db.c | 2 +-
t/t0001-init.sh | 2 +-
5 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index 86eb4c9..b093e45 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -12,7 +12,7 @@ SYNOPSIS
'git clone' [--template=<template_directory>]
[-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]
[-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>]
- [--separate-git-dir|-L <git dir>]
+ [--separate-git-dir <git dir>]
[--depth <depth>] [--recursive|--recurse-submodules] [--] <repository>
[<directory>]
@@ -177,7 +177,6 @@ objects from the source repository into a pack in the cloned repository.
repository does not have a worktree/checkout (i.e. if any of
`--no-checkout`/`-n`, `--bare`, or `--mirror` is given)
--L=<git dir>::
--separate-git-dir=<git dir>::
Instead of placing the cloned repository where it is supposed
to be, place the cloned repository at the specified directory,
diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt
index 58cd011..f2777a7 100644
--- a/Documentation/git-init.txt
+++ b/Documentation/git-init.txt
@@ -9,7 +9,7 @@ git-init - Create an empty git repository or reinitialize an existing one
SYNOPSIS
--------
'git init' [-q | --quiet] [--bare] [--template=<template_directory>]
- [--separate-git-dir|-L <git dir>]
+ [--separate-git-dir <git dir>]
[--shared[=<permissions>]] [directory]
@@ -54,7 +54,6 @@ current working directory.
Specify the directory from which templates will be used. (See the "TEMPLATE
DIRECTORY" section below.)
--L=<git dir>::
--separate-git-dir=<git dir>::
Instead of initializing the repository where it is supposed to be,
diff --git a/builtin/clone.c b/builtin/clone.c
index 49c838f..f579794 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -81,7 +81,7 @@ static struct option builtin_clone_options[] = {
"path to git-upload-pack on the remote"),
OPT_STRING(0, "depth", &option_depth, "depth",
"create a shallow clone of that depth"),
- OPT_STRING('L', "separate-git-dir", &real_git_dir, "gitdir",
+ OPT_STRING(0, "separate-git-dir", &real_git_dir, "gitdir",
"separate git dir from working tree"),
OPT_END()
diff --git a/builtin/init-db.c b/builtin/init-db.c
index ba13a54..025aa47 100644
--- a/builtin/init-db.c
+++ b/builtin/init-db.c
@@ -490,7 +490,7 @@ int cmd_init_db(int argc, const char **argv, const char *prefix)
"specify that the git repository is to be shared amongst several users",
PARSE_OPT_OPTARG | PARSE_OPT_NONEG, shared_callback, 0},
OPT_BIT('q', "quiet", &flags, "be quiet", INIT_DB_QUIET),
- OPT_STRING('L', "separate-git-dir", &real_git_dir, "gitdir",
+ OPT_STRING(0, "separate-git-dir", &real_git_dir, "gitdir",
"separate git dir from working tree"),
OPT_END()
};
diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index 8106af8..ad66410 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -409,7 +409,7 @@ test_expect_success SYMLINKS 're-init to move gitdir symlink' '
cd newdir &&
mv .git here &&
ln -s here .git &&
- git init -L ../realgitdir
+ git init --separate-git-dir ../realgitdir
) &&
echo "gitdir: `pwd`/realgitdir" >expected &&
test_cmp expected newdir/.git &&
--
1.7.4.74.g639db
-- 8< --
--
Duy
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-05-24 16:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-24 14:41 [PATCH] Fix usage of git-init and git-init-db documentation Marc Pegon
2011-05-24 15:58 ` Junio C Hamano
2011-05-24 16:04 ` Nguyen Thai Ngoc Duy
2011-05-24 16:26 ` Junio C Hamano
2011-05-24 16:40 ` Nguyen Thai Ngoc Duy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).