init, clone: support --separate-git-dir for .git file
--separate-git-dir tells git to create git dir at the specified
location, instead of where it is supposed to be. A .git file that
points to that location will be put in place so that it appears normal
to repo discovery process.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Nguyễn Thái Ngọc Duy14 years agocommitted byJunio C Hamano
@ -176,6 +177,15 @@ objects from the source repository into a pack in the cloned repository.
@@ -176,6 +177,15 @@ 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,
then make a filesytem-agnostic git symbolic link to there.
The result is git repository can be separated from working
tree.
<repository>::
The (possibly remote) repository to clone from. See the
<<URLS,URLS>> section below for more information on specifying
@ -8,7 +8,9 @@ git-init - Create an empty git repository or reinitialize an existing one
@@ -8,7 +8,9 @@ git-init - Create an empty git repository or reinitialize an existing one