"init-db" can really be just "init"
Make "init" the equivalent of "init-db". This should make first GIT impression a little more friendly. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Nicolas Pitre committed
Jan 7, 2007 at 12:31 UTC
515377ea9ec6192f82a2fa5c5b5b7651d9d6cf6c
8 files changed
+9
-6
Documentation/everyday.txt
+2
-2
@@ -25,7 +25,7 @@ Basic Repository[[Basic Repository]]
25
26
Everybody uses these commands to maintain git repositories.
27
28
- * gitlink:git-init-db[1] or gitlink:git-clone[1] to create a
28
+ * gitlink:git-init[1] or gitlink:git-clone[1] to create a
29
new repository.
30
31
* gitlink:git-fsck-objects[1] to check the repository for errors.
@@ -107,7 +107,7 @@ Use a tarball as a starting point for a new repository.::
107
------------
108
$ tar zxf frotz.tar.gz
109
$ cd frotz
110
-$ git-init-db
110
+$ git-init
111
$ git add . <1>
112
$ git commit -m 'import of frotz source tree.'
113
$ git tag v2.43 <2>
Documentation/git-init-db.txt
+1
@@ -74,6 +74,7 @@ Running `git-init-db` in an existing repository is safe. It will not overwrite
74
things that are already there. The primary reason for rerunning `git-init-db`
75
is to pick up newly added templates.
76
77
+Note that `git-init` is the same as `git-init-db`.
78
79
80
EXAMPLES
Documentation/git.txt
+1
@@ -353,6 +353,7 @@ gitlink:git-hash-object[1]::
353
gitlink:git-index-pack[1]::
354
Build pack idx file for an existing packed archive.
355
356
+gitlink:git-init[1]::
357
gitlink:git-init-db[1]::
358
Creates an empty git object database, or reinitialize an
359
existing one.
Documentation/tutorial-2.txt
+1
-1
@@ -17,7 +17,7 @@ Let's start a new project and create a small amount of history:
17
------------------------------------------------
18
$ mkdir test-project
19
$ cd test-project
20
-$ git init-db
20
+$ git init
21
Initialized empty Git repository in .git/
22
$ echo 'hello world' > file.txt
23
$ git add .
Documentation/tutorial.txt
+1
-1
@@ -32,7 +32,7 @@ can place it under git revision control as follows.
32
------------------------------------------------
33
$ tar xzf project.tar.gz
34
$ cd project
35
-$ git init-db
35
+$ git init
36
------------------------------------------------
37
38
Git will reply
Makefile
+1
-1
@@ -210,7 +210,7 @@ EXTRA_PROGRAMS =
210
211
BUILT_INS = \
212
git-format-patch$X git-show$X git-whatchanged$X git-cherry$X \
213
- git-get-tar-commit-id$X \
213
+ git-get-tar-commit-id$X git-init$X \
214
$(patsubst builtin-%.o,git-%$X,$(BUILTIN_OBJS))
215
216
# what 'all' will build and 'install' will install, in gitexecdir
builtin-init-db.c
+1
-1
@@ -259,7 +259,7 @@ static int create_default_files(const char *git_dir, const char *template_path)
259
}
260
261
static const char init_db_usage[] =
262
-"git-init-db [--template=<template-directory>] [--shared]";
262
+"git-init [--template=<template-directory>] [--shared]";
263
264
/*
265
* If you want to, you can share the DB area with any number of branches.
git.c
+1
@@ -231,6 +231,7 @@ static void handle_internal_command(int argc, const char **argv, char **envp)
231
{ "get-tar-commit-id", cmd_get_tar_commit_id },
232
{ "grep", cmd_grep, RUN_SETUP },
233
{ "help", cmd_help },
234
+ { "init", cmd_init_db },
235
{ "init-db", cmd_init_db },
236
{ "log", cmd_log, RUN_SETUP | USE_PAGER },
237
{ "ls-files", cmd_ls_files, RUN_SETUP },