Browse Source

"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>
maint
Nicolas Pitre 18 years ago committed by Junio C Hamano
parent
commit
515377ea9e
  1. 4
      Documentation/everyday.txt
  2. 1
      Documentation/git-init-db.txt
  3. 1
      Documentation/git.txt
  4. 2
      Documentation/tutorial-2.txt
  5. 2
      Documentation/tutorial.txt
  6. 2
      Makefile
  7. 2
      builtin-init-db.c
  8. 1
      git.c

4
Documentation/everyday.txt

@ -25,7 +25,7 @@ Basic Repository[[Basic Repository]] @@ -25,7 +25,7 @@ Basic Repository[[Basic Repository]]

Everybody uses these commands to maintain git repositories.

* gitlink:git-init-db[1] or gitlink:git-clone[1] to create a
* gitlink:git-init[1] or gitlink:git-clone[1] to create a
new repository.

* 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,7 +107,7 @@ Use a tarball as a starting point for a new repository.::
------------
$ tar zxf frotz.tar.gz
$ cd frotz
$ git-init-db
$ git-init
$ git add . <1>
$ git commit -m 'import of frotz source tree.'
$ git tag v2.43 <2>

1
Documentation/git-init-db.txt

@ -74,6 +74,7 @@ Running `git-init-db` in an existing repository is safe. It will not overwrite @@ -74,6 +74,7 @@ Running `git-init-db` in an existing repository is safe. It will not overwrite
things that are already there. The primary reason for rerunning `git-init-db`
is to pick up newly added templates.

Note that `git-init` is the same as `git-init-db`.


EXAMPLES

1
Documentation/git.txt

@ -353,6 +353,7 @@ gitlink:git-hash-object[1]:: @@ -353,6 +353,7 @@ gitlink:git-hash-object[1]::
gitlink:git-index-pack[1]::
Build pack idx file for an existing packed archive.

gitlink:git-init[1]::
gitlink:git-init-db[1]::
Creates an empty git object database, or reinitialize an
existing one.

2
Documentation/tutorial-2.txt

@ -17,7 +17,7 @@ Let's start a new project and create a small amount of history: @@ -17,7 +17,7 @@ Let's start a new project and create a small amount of history:
------------------------------------------------
$ mkdir test-project
$ cd test-project
$ git init-db
$ git init
Initialized empty Git repository in .git/
$ echo 'hello world' > file.txt
$ git add .

2
Documentation/tutorial.txt

@ -32,7 +32,7 @@ can place it under git revision control as follows. @@ -32,7 +32,7 @@ can place it under git revision control as follows.
------------------------------------------------
$ tar xzf project.tar.gz
$ cd project
$ git init-db
$ git init
------------------------------------------------

Git will reply

2
Makefile

@ -210,7 +210,7 @@ EXTRA_PROGRAMS = @@ -210,7 +210,7 @@ EXTRA_PROGRAMS =

BUILT_INS = \
git-format-patch$X git-show$X git-whatchanged$X git-cherry$X \
git-get-tar-commit-id$X \
git-get-tar-commit-id$X git-init$X \
$(patsubst builtin-%.o,git-%$X,$(BUILTIN_OBJS))

# what 'all' will build and 'install' will install, in gitexecdir

2
builtin-init-db.c

@ -259,7 +259,7 @@ static int create_default_files(const char *git_dir, const char *template_path) @@ -259,7 +259,7 @@ static int create_default_files(const char *git_dir, const char *template_path)
}

static const char init_db_usage[] =
"git-init-db [--template=<template-directory>] [--shared]";
"git-init [--template=<template-directory>] [--shared]";

/*
* If you want to, you can share the DB area with any number of branches.

1
git.c

@ -231,6 +231,7 @@ static void handle_internal_command(int argc, const char **argv, char **envp) @@ -231,6 +231,7 @@ static void handle_internal_command(int argc, const char **argv, char **envp)
{ "get-tar-commit-id", cmd_get_tar_commit_id },
{ "grep", cmd_grep, RUN_SETUP },
{ "help", cmd_help },
{ "init", cmd_init_db },
{ "init-db", cmd_init_db },
{ "log", cmd_log, RUN_SETUP | USE_PAGER },
{ "ls-files", cmd_ls_files, RUN_SETUP },

Loading…
Cancel
Save