init/clone: remove short option -L and document --separate-git-dir
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
9963e025e8
commit
09ffc706e4
@ -12,7 +12,7 @@ SYNOPSIS
|
|||||||
'git clone' [--template=<template_directory>]
|
'git clone' [--template=<template_directory>]
|
||||||
[-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]
|
[-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]
|
||||||
[-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>]
|
[-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>
|
[--depth <depth>] [--recursive|--recurse-submodules] [--] <repository>
|
||||||
[<directory>]
|
[<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
|
repository does not have a worktree/checkout (i.e. if any of
|
||||||
`--no-checkout`/`-n`, `--bare`, or `--mirror` is given)
|
`--no-checkout`/`-n`, `--bare`, or `--mirror` is given)
|
||||||
|
|
||||||
-L=<git dir>::
|
|
||||||
--separate-git-dir=<git dir>::
|
--separate-git-dir=<git dir>::
|
||||||
Instead of placing the cloned repository where it is supposed
|
Instead of placing the cloned repository where it is supposed
|
||||||
to be, place the cloned repository at the specified directory,
|
to be, place the cloned repository at the specified directory,
|
||||||
|
@ -8,7 +8,7 @@ git-init-db - Creates an empty git repository
|
|||||||
|
|
||||||
SYNOPSIS
|
SYNOPSIS
|
||||||
--------
|
--------
|
||||||
'git init-db' [-q | --quiet] [--bare] [--template=<template_directory>] [--shared[=<permissions>]]
|
'git init-db' [-q | --quiet] [--bare] [--template=<template_directory>] [--separate-git-dir <git dir>] [--shared[=<permissions>]]
|
||||||
|
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
@ -9,7 +9,7 @@ git-init - Create an empty git repository or reinitialize an existing one
|
|||||||
SYNOPSIS
|
SYNOPSIS
|
||||||
--------
|
--------
|
||||||
'git init' [-q | --quiet] [--bare] [--template=<template_directory>]
|
'git init' [-q | --quiet] [--bare] [--template=<template_directory>]
|
||||||
[--separate-git-dir|-L <git dir>]
|
[--separate-git-dir <git dir>]
|
||||||
[--shared[=<permissions>]] [directory]
|
[--shared[=<permissions>]] [directory]
|
||||||
|
|
||||||
|
|
||||||
@ -54,7 +54,6 @@ current working directory.
|
|||||||
Specify the directory from which templates will be used. (See the "TEMPLATE
|
Specify the directory from which templates will be used. (See the "TEMPLATE
|
||||||
DIRECTORY" section below.)
|
DIRECTORY" section below.)
|
||||||
|
|
||||||
-L=<git dir>::
|
|
||||||
--separate-git-dir=<git dir>::
|
--separate-git-dir=<git dir>::
|
||||||
|
|
||||||
Instead of initializing the repository where it is supposed to be,
|
Instead of initializing the repository where it is supposed to be,
|
||||||
|
@ -81,7 +81,7 @@ static struct option builtin_clone_options[] = {
|
|||||||
"path to git-upload-pack on the remote"),
|
"path to git-upload-pack on the remote"),
|
||||||
OPT_STRING(0, "depth", &option_depth, "depth",
|
OPT_STRING(0, "depth", &option_depth, "depth",
|
||||||
"create a shallow clone of that 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"),
|
"separate git dir from working tree"),
|
||||||
|
|
||||||
OPT_END()
|
OPT_END()
|
||||||
|
@ -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",
|
"specify that the git repository is to be shared amongst several users",
|
||||||
PARSE_OPT_OPTARG | PARSE_OPT_NONEG, shared_callback, 0},
|
PARSE_OPT_OPTARG | PARSE_OPT_NONEG, shared_callback, 0},
|
||||||
OPT_BIT('q', "quiet", &flags, "be quiet", INIT_DB_QUIET),
|
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"),
|
"separate git dir from working tree"),
|
||||||
OPT_END()
|
OPT_END()
|
||||||
};
|
};
|
||||||
|
@ -409,7 +409,7 @@ test_expect_success SYMLINKS 're-init to move gitdir symlink' '
|
|||||||
cd newdir &&
|
cd newdir &&
|
||||||
mv .git here &&
|
mv .git here &&
|
||||||
ln -s here .git &&
|
ln -s here .git &&
|
||||||
git init -L ../realgitdir
|
git init --separate-git-dir ../realgitdir
|
||||||
) &&
|
) &&
|
||||||
echo "gitdir: `pwd`/realgitdir" >expected &&
|
echo "gitdir: `pwd`/realgitdir" >expected &&
|
||||||
test_cmp expected newdir/.git &&
|
test_cmp expected newdir/.git &&
|
||||||
|
Loading…
Reference in New Issue
Block a user