git-clone: PG13 --naked option to --bare.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Jan 22, 2006 at 17:24 UTC
87e80c4b5fec421ecd566498b7dd4672f76fdca2
3 files changed
+17
-16
Documentation/git-clone.txt
+6
-6
@@ -9,7 +9,7 @@ git-clone - Clones a repository.
9
SYNOPSIS
10
--------
11
[verse]
12
-'git-clone' [-l [-s]] [-q] [-n] [--naked] [-o <name>] [-u <upload-pack>]
12
+'git-clone' [-l [-s]] [-q] [-n] [--bare] [-o <name>] [-u <upload-pack>]
13
<repository> [<directory>]
14
15
DESCRIPTION
@@ -58,8 +58,8 @@ OPTIONS
58
-n::
59
No checkout of HEAD is performed after the clone is complete.
60
61
---naked::
62
- Make a 'naked' GIT repository. That is, instead of
61
+--bare::
62
+ Make a 'bare' GIT repository. That is, instead of
63
creating `<directory>` and placing the administrative
64
files in `<directory>/.git`, make the `<directory>`
65
itself the `$GIT_DIR`. This implies `-n` option.
@@ -110,17 +110,17 @@ $ git show-branch
110
------------
111
112
113
-Create a naked repository to publish your changes to the public::
113
+Create a bare repository to publish your changes to the public::
114
+
115
------------
116
-$ git clone --naked -l /home/proj/.git /pub/scm/proj.git
116
+$ git clone --bare -l /home/proj/.git /pub/scm/proj.git
117
------------
118
119
120
Create a repository on the kernel.org machine that borrows from Linus::
121
+
122
------------
123
-$ git clone --naked -l -s /pub/scm/.../torvalds/linux-2.6.git \
123
+$ git clone --bare -l -s /pub/scm/.../torvalds/linux-2.6.git \
124
/pub/scm/.../me/subsys-2.6.git
125
------------
126
Documentation/repository-layout.txt
+3
-3
@@ -3,7 +3,7 @@ git repository layout
3
4
You may find these things in your git repository (`.git`
5
directory for a repository associated with your working tree, or
6
-`'project'.git` directory for a public 'naked' repository).
6
+`'project'.git` directory for a public 'bare' repository).
7
8
objects::
9
Object store associated with this repository. Usually
@@ -73,7 +73,7 @@ HEAD::
73
A symlink of the form `refs/heads/'name'` to point at
74
the current branch, if exists. It does not mean much if
75
the repository is not associated with any working tree
76
- (i.e. 'naked' repository), but a valid git repository
76
+ (i.e. a 'bare' repository), but a valid git repository
77
*must* have such a symlink here. It is legal if the
78
named branch 'name' does not (yet) exist.
79
@@ -92,7 +92,7 @@ hooks::
92
93
index::
94
The current index file for the repository. It is
95
- usually not found in a naked repository.
95
+ usually not found in a bare repository.
96
97
info::
98
Additional information about the repository is recorded
git-clone.sh
+8
-7
@@ -9,7 +9,7 @@
9
unset CDPATH
10
11
usage() {
12
- echo >&2 "Usage: $0 [--naked] [-l [-s]] [-q] [-u <upload-pack>] [-o <name>] [-n] <repo> [<dir>]"
12
+ echo >&2 "Usage: $0 [--bare] [-l [-s]] [-q] [-u <upload-pack>] [-o <name>] [-n] <repo> [<dir>]"
13
exit 1
14
}
15
@@ -53,7 +53,7 @@ use_local=no
53
local_shared=no
54
no_checkout=
55
upload_pack=
56
-naked=
56
+bare=
57
origin=origin
58
while
59
case "$#,$1" in
@@ -61,7 +61,8 @@ while
61
*,-n|*,--no|*,--no-|*,--no-c|*,--no-ch|*,--no-che|*,--no-chec|\
62
*,--no-check|*,--no-checko|*,--no-checkou|*,--no-checkout)
63
no_checkout=yes ;;
64
- *,--na|*,--nak|*,--nake|*,--naked) naked=yes ;;
64
+ *,--na|*,--nak|*,--nake|*,--naked|\
65
+ *,-b|*,--b|*,--ba|*,--bar|*,--bare) bare=yes ;;
66
*,-l|*,--l|*,--lo|*,--loc|*,--loca|*,--local) use_local=yes ;;
67
*,-s|*,--s|*,--sh|*,--sha|*,--shar|*,--share|*,--shared)
68
local_shared=yes; use_local=yes ;;
@@ -85,8 +86,8 @@ do
86
shift
87
done
88
88
-# --naked implies --no-checkout
89
-test -z "$naked" || no_checkout=yes
89
+# --bare implies --no-checkout
90
+test =z "$bare" || no_checkout=yes
91
92
# Turn the source into an absolute path if
93
# it is local
@@ -103,11 +104,11 @@ dir="$2"
104
[ -e "$dir" ] && echo "$dir already exists." && usage
105
mkdir -p "$dir" &&
106
D=$(cd "$dir" && pwd) &&
106
-case "$naked" in
107
+case "$bare" in
108
yes) GIT_DIR="$D" ;;
109
*) GIT_DIR="$D/.git" ;;
110
esac && export GIT_DIR && git-init-db || usage
110
-case "$naked" in
111
+case "$bare" in
112
yes)
113
GIT_DIR="$D" ;;
114
*)