{"thread":{"id":"6268","subject":"[PATCH] \"init-db\" can really be just \"init\"","startedAt":"2007-01-07T17:31:29Z","lastAt":"2007-01-07T17:31:29Z","messageCount":1,"participants":["Nicolas Pitre"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"31061","messageId":"Pine.LNX.4.64.0701071216190.4964@xanadu.home","threadId":"6268","inReplyTo":null,"subject":"[PATCH] \"init-db\" can really be just \"init\"","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2007-01-07T17:31:29Z","receivedAt":"2007-01-07T17:31:29Z","isPatch":true,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"\nMake \"init\" the equivalent of \"init-db\". This should make first GIT \nimpression a little more friendly.\n\nSigned-off-by: Nicolas Pitre <nico@cam.org>\n---\n\nI'm resending this as I think this is still pertinent and I cannot \nremember what the initial issue against this was and whether it is still \nvalid.\n\nThis would be a nice rule of thumb to try to have all porcelainish \ncommands not have any hyphen in their name, like \"diff\", \"commit\", \n\"add\", \"rm\", \"checkout\", etc. ?\n\ndiff --git a/Documentation/everyday.txt b/Documentation/everyday.txt\nindex 2105a3d..4e83994 100644\n--- a/Documentation/everyday.txt\n+++ b/Documentation/everyday.txt\n@@ -25,7 +25,7 @@ Basic Repository[[Basic Repository]]\n \n Everybody uses these commands to maintain git repositories.\n \n-  * gitlink:git-init-db[1] or gitlink:git-clone[1] to create a\n+  * gitlink:git-init[1] or gitlink:git-clone[1] to create a\n     new repository.\n \n   * gitlink:git-fsck-objects[1] to check the repository for errors.\n@@ -107,7 +107,7 @@ Use a tarball as a starting point for a new repository.::\n ------------\n $ tar zxf frotz.tar.gz\n $ cd frotz\n-$ git-init-db\n+$ git-init\n $ git add . <1>\n $ git commit -m 'import of frotz source tree.'\n $ git tag v2.43 <2>\ndiff --git a/Documentation/git-init-db.txt b/Documentation/git-init-db.txt\nindex ca7d09d..bc3ba14 100644\n--- a/Documentation/git-init-db.txt\n+++ b/Documentation/git-init-db.txt\n@@ -74,6 +74,7 @@ Running `git-init-db` in an existing repository is safe. It will not overwrite\n things that are already there. The primary reason for rerunning `git-init-db`\n is to pick up newly added templates.\n \n+Note that `git-init` is the same as `git-init-db`.\n \n \n EXAMPLES\ndiff --git a/Documentation/git.txt b/Documentation/git.txt\nindex 36b2126..5662cdc 100644\n--- a/Documentation/git.txt\n+++ b/Documentation/git.txt\n@@ -353,6 +353,7 @@ gitlink:git-hash-object[1]::\n gitlink:git-index-pack[1]::\n \tBuild pack idx file for an existing packed archive.\n \n+gitlink:git-init[1]::\n gitlink:git-init-db[1]::\n \tCreates an empty git object database, or reinitialize an\n \texisting one.\ndiff --git a/Documentation/tutorial-2.txt b/Documentation/tutorial-2.txt\nindex 60e5477..f48894c 100644\n--- a/Documentation/tutorial-2.txt\n+++ b/Documentation/tutorial-2.txt\n@@ -17,7 +17,7 @@ Let's start a new project and create a small amount of history:\n ------------------------------------------------\n $ mkdir test-project\n $ cd test-project\n-$ git init-db\n+$ git init\n Initialized empty Git repository in .git/\n $ echo 'hello world' > file.txt\n $ git add .\ndiff --git a/Documentation/tutorial.txt b/Documentation/tutorial.txt\nindex 01d4a47..d2bf0b9 100644\n--- a/Documentation/tutorial.txt\n+++ b/Documentation/tutorial.txt\n@@ -32,7 +32,7 @@ can place it under git revision control as follows.\n ------------------------------------------------\n $ tar xzf project.tar.gz\n $ cd project\n-$ git init-db\n+$ git init\n ------------------------------------------------\n \n Git will reply\ndiff --git a/Makefile b/Makefile\nindex 80c2c65..9376be2 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -210,7 +210,7 @@ EXTRA_PROGRAMS =\n \n BUILT_INS = \\\n \tgit-format-patch$X git-show$X git-whatchanged$X git-cherry$X \\\n-\tgit-get-tar-commit-id$X \\\n+\tgit-get-tar-commit-id$X git-init$X \\\n \t$(patsubst builtin-%.o,git-%$X,$(BUILTIN_OBJS))\n \n # what 'all' will build and 'install' will install, in gitexecdir\ndiff --git a/builtin-init-db.c b/builtin-init-db.c\nindex 97fd82f..bbef820 100644\n--- a/builtin-init-db.c\n+++ b/builtin-init-db.c\n@@ -259,7 +259,7 @@ static int create_default_files(const char *git_dir, const char *template_path)\n }\n \n static const char init_db_usage[] =\n-\"git-init-db [--template=<template-directory>] [--shared]\";\n+\"git-init [--template=<template-directory>] [--shared]\";\n \n /*\n  * If you want to, you can share the DB area with any number of branches.\ndiff --git a/git.c b/git.c\nindex c82ca45..bf55499 100644\n--- a/git.c\n+++ b/git.c\n@@ -231,6 +231,7 @@ static void handle_internal_command(int argc, const char **argv, char **envp)\n \t\t{ \"get-tar-commit-id\", cmd_get_tar_commit_id },\n \t\t{ \"grep\", cmd_grep, RUN_SETUP },\n \t\t{ \"help\", cmd_help },\n+\t\t{ \"init\", cmd_init_db },\n \t\t{ \"init-db\", cmd_init_db },\n \t\t{ \"log\", cmd_log, RUN_SETUP | USE_PAGER },\n \t\t{ \"ls-files\", cmd_ls_files, RUN_SETUP },\n"}]}