Skip to content

Commit 09ffc70

Browse files
pcloudsgitster
authored andcommitted
init/clone: remove short option -L and document --separate-git-dir
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9963e02 commit 09ffc70

File tree

6 files changed

+6
-8
lines changed

6 files changed

+6
-8
lines changed

Documentation/git-clone.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ SYNOPSIS
1212
'git clone' [--template=<template_directory>]
1313
[-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]
1414
[-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>]
15-
[--separate-git-dir|-L <git dir>]
15+
[--separate-git-dir <git dir>]
1616
[--depth <depth>] [--recursive|--recurse-submodules] [--] <repository>
1717
[<directory>]
1818

@@ -177,7 +177,6 @@ objects from the source repository into a pack in the cloned repository.
177177
repository does not have a worktree/checkout (i.e. if any of
178178
`--no-checkout`/`-n`, `--bare`, or `--mirror` is given)
179179

180-
-L=<git dir>::
181180
--separate-git-dir=<git dir>::
182181
Instead of placing the cloned repository where it is supposed
183182
to be, place the cloned repository at the specified directory,

Documentation/git-init-db.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ git-init-db - Creates an empty git repository
88

99
SYNOPSIS
1010
--------
11-
'git init-db' [-q | --quiet] [--bare] [--template=<template_directory>] [--shared[=<permissions>]]
11+
'git init-db' [-q | --quiet] [--bare] [--template=<template_directory>] [--separate-git-dir <git dir>] [--shared[=<permissions>]]
1212

1313

1414
DESCRIPTION

Documentation/git-init.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ git-init - Create an empty git repository or reinitialize an existing one
99
SYNOPSIS
1010
--------
1111
'git init' [-q | --quiet] [--bare] [--template=<template_directory>]
12-
[--separate-git-dir|-L <git dir>]
12+
[--separate-git-dir <git dir>]
1313
[--shared[=<permissions>]] [directory]
1414

1515

@@ -54,7 +54,6 @@ current working directory.
5454
Specify the directory from which templates will be used. (See the "TEMPLATE
5555
DIRECTORY" section below.)
5656

57-
-L=<git dir>::
5857
--separate-git-dir=<git dir>::
5958

6059
Instead of initializing the repository where it is supposed to be,

builtin/clone.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ static struct option builtin_clone_options[] = {
8181
"path to git-upload-pack on the remote"),
8282
OPT_STRING(0, "depth", &option_depth, "depth",
8383
"create a shallow clone of that depth"),
84-
OPT_STRING('L', "separate-git-dir", &real_git_dir, "gitdir",
84+
OPT_STRING(0, "separate-git-dir", &real_git_dir, "gitdir",
8585
"separate git dir from working tree"),
8686

8787
OPT_END()

builtin/init-db.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ int cmd_init_db(int argc, const char **argv, const char *prefix)
490490
"specify that the git repository is to be shared amongst several users",
491491
PARSE_OPT_OPTARG | PARSE_OPT_NONEG, shared_callback, 0},
492492
OPT_BIT('q', "quiet", &flags, "be quiet", INIT_DB_QUIET),
493-
OPT_STRING('L', "separate-git-dir", &real_git_dir, "gitdir",
493+
OPT_STRING(0, "separate-git-dir", &real_git_dir, "gitdir",
494494
"separate git dir from working tree"),
495495
OPT_END()
496496
};

t/t0001-init.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ test_expect_success SYMLINKS 're-init to move gitdir symlink' '
409409
cd newdir &&
410410
mv .git here &&
411411
ln -s here .git &&
412-
git init -L ../realgitdir
412+
git init --separate-git-dir ../realgitdir
413413
) &&
414414
echo "gitdir: `pwd`/realgitdir" >expected &&
415415
test_cmp expected newdir/.git &&

0 commit comments

Comments
 (0)