diff options
-rw-r--r-- | Documentation/config.txt | 2 | ||||
-rw-r--r-- | Documentation/core-tutorial.txt | 10 | ||||
-rw-r--r-- | Documentation/cvs-migration.txt | 2 | ||||
-rw-r--r-- | Documentation/git-init.txt | 4 | ||||
-rw-r--r-- | Documentation/git-p4import.txt | 2 | ||||
-rw-r--r-- | Documentation/git-svn.txt | 6 | ||||
-rw-r--r-- | Documentation/git.txt | 3 | ||||
-rw-r--r-- | Documentation/hooks.txt | 2 | ||||
-rw-r--r-- | Documentation/howto/setup-git-server-over-http.txt | 2 | ||||
-rw-r--r-- | Documentation/repository-layout.txt | 2 | ||||
-rw-r--r-- | INSTALL | 2 | ||||
-rw-r--r-- | builtin-init-db.c | 2 | ||||
-rwxr-xr-x | generate-cmdlist.sh | 2 | ||||
-rwxr-xr-x | git-archimport.perl | 2 | ||||
-rwxr-xr-x | git-clone.sh | 2 | ||||
-rwxr-xr-x | git-cvsimport.perl | 4 | ||||
-rw-r--r-- | git-p4import.py | 2 | ||||
-rwxr-xr-x | git-svn.perl | 2 | ||||
-rwxr-xr-x | git-svnimport.perl | 2 | ||||
-rw-r--r-- | perl/Git.pm | 2 | ||||
-rw-r--r-- | t/README | 2 | ||||
-rwxr-xr-x | t/t0000-basic.sh | 4 | ||||
-rwxr-xr-x | t/t4116-apply-reverse.sh | 4 | ||||
-rwxr-xr-x | t/t5300-pack-object.sh | 6 | ||||
-rwxr-xr-x | t/t5500-fetch-pack.sh | 2 | ||||
-rwxr-xr-x | t/t5510-fetch.sh | 2 | ||||
-rwxr-xr-x | t/t5520-pull.sh | 2 | ||||
-rwxr-xr-x | t/t7001-mv.sh | 4 | ||||
-rwxr-xr-x | t/test-lib.sh | 4 |
29 files changed, 42 insertions, 45 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt index b4aae0d0ae..f7dba8977f 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -100,7 +100,7 @@ core.sharedRepository:: group-writable). When 'all' (or 'world' or 'everybody'), the repository will be readable by all users, additionally to being group-shareable. When 'umask' (or 'false'), git will use permissions - reported by umask(2). See gitlink:git-init-db[1]. False by default. + reported by umask(2). See gitlink:git-init[1]. False by default. core.warnAmbiguousRefs:: If true, git will warn you if the ref name you passed it is ambiguous diff --git a/Documentation/core-tutorial.txt b/Documentation/core-tutorial.txt index 5ea611748c..0cd33fb5b7 100644 --- a/Documentation/core-tutorial.txt +++ b/Documentation/core-tutorial.txt @@ -46,12 +46,12 @@ to import into git. For our first example, we're going to start a totally new repository from scratch, with no pre-existing files, and we'll call it `git-tutorial`. To start up, create a subdirectory for it, change into that -subdirectory, and initialize the git infrastructure with `git-init-db`: +subdirectory, and initialize the git infrastructure with `git-init`: ------------------------------------------------ $ mkdir git-tutorial $ cd git-tutorial -$ git-init-db +$ git-init ------------------------------------------------ to which git will reply @@ -1371,11 +1371,11 @@ $ mkdir my-git.git ------------ Then, make that directory into a git repository by running -`git init-db`, but this time, since its name is not the usual +`git init`, but this time, since its name is not the usual `.git`, we do things slightly differently: ------------ -$ GIT_DIR=my-git.git git-init-db +$ GIT_DIR=my-git.git git-init ------------ Make sure this directory is available for others you want your @@ -1511,7 +1511,7 @@ A recommended workflow for a "project lead" goes like this: + If other people are pulling from your repository over dumb transport protocols (HTTP), you need to keep this repository -'dumb transport friendly'. After `git init-db`, +'dumb transport friendly'. After `git init`, `$GIT_DIR/hooks/post-update` copied from the standard templates would contain a call to `git-update-server-info` but the `post-update` hook itself is disabled by default -- enable it diff --git a/Documentation/cvs-migration.txt b/Documentation/cvs-migration.txt index 8e09beaa79..775bf4266a 100644 --- a/Documentation/cvs-migration.txt +++ b/Documentation/cvs-migration.txt @@ -80,7 +80,7 @@ it: ------------------------------------------------ $ mkdir /pub/my-repo.git $ cd /pub/my-repo.git -$ git --bare init-db --shared +$ git --bare init --shared $ git --bare fetch /home/alice/myproject master:master ------------------------------------------------ diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt index e1fd6884f0..596b567c90 100644 --- a/Documentation/git-init.txt +++ b/Documentation/git-init.txt @@ -79,9 +79,7 @@ was primarily meant to initialize the object database, but over time it has become responsible for setting up the other aspects of the repository, such as installing the default hooks and setting the configuration variables. The old name is retained -because people are so used to it and many existing documents -refer to it that way, and this will not change for some time to -come. +for backward compatibility reasons. EXAMPLES diff --git a/Documentation/git-p4import.txt b/Documentation/git-p4import.txt index ee9e8fa909..6edb9f12b8 100644 --- a/Documentation/git-p4import.txt +++ b/Documentation/git-p4import.txt @@ -93,7 +93,7 @@ perforce branch into a branch named "jammy", like so: ------------ $ mkdir -p /home/sean/import/jam $ cd /home/sean/import/jam -$ git init-db +$ git init $ git p4import //public/jam jammy ------------ diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 1b013139af..9ed721118b 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -171,7 +171,7 @@ OPTIONS --shared:: --template=<template_directory>:: Only used with the 'init' command. - These are passed directly to gitlink:git-init-db[1]. + These are passed directly to gitlink:git-init[1]. -r <ARG>:: --revision <ARG>:: @@ -367,7 +367,7 @@ Basic Examples Tracking and contributing to a the trunk of a Subversion-managed project: ------------------------------------------------------------------------ -# Initialize a repo (like git init-db): +# Initialize a repo (like git init): git-svn init http://svn.foo.org/project/trunk # Fetch remote revisions: git-svn fetch @@ -388,7 +388,7 @@ See also: '<<tracking-multiple-repos,Tracking Multiple Repositories or Branches>>' ------------------------------------------------------------------------ -# Initialize a repo (like git init-db): +# Initialize a repo (like git init): git-svn multi-init http://svn.foo.org/project \ -T trunk -b branches -t tags # Fetch remote revisions: diff --git a/Documentation/git.txt b/Documentation/git.txt index 5662cdc27c..f89d745efa 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -354,8 +354,7 @@ 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 + Creates an empty git repository, or reinitialize an existing one. gitlink:git-merge-file[1]:: diff --git a/Documentation/hooks.txt b/Documentation/hooks.txt index 161123f142..e3b76f96eb 100644 --- a/Documentation/hooks.txt +++ b/Documentation/hooks.txt @@ -3,7 +3,7 @@ Hooks used by git Hooks are little scripts you can place in `$GIT_DIR/hooks` directory to trigger action at certain points. When -`git-init-db` is run, a handful example hooks are copied in the +`git-init` is run, a handful example hooks are copied in the `hooks` directory of the new repository, but by default they are all disabled. To enable a hook, make it executable with `chmod +x`. diff --git a/Documentation/howto/setup-git-server-over-http.txt b/Documentation/howto/setup-git-server-over-http.txt index ba191569af..a202f3a460 100644 --- a/Documentation/howto/setup-git-server-over-http.txt +++ b/Documentation/howto/setup-git-server-over-http.txt @@ -70,7 +70,7 @@ DocumentRoot /where/ever/httpd.conf" to find your root: Initialize a bare repository $ cd my-new-repo.git - $ git --bare init-db + $ git --bare init Change the ownership to your web-server's credentials. Use "grep ^User diff --git a/Documentation/repository-layout.txt b/Documentation/repository-layout.txt index e20fb7e74c..0fdd36614d 100644 --- a/Documentation/repository-layout.txt +++ b/Documentation/repository-layout.txt @@ -102,7 +102,7 @@ branches:: hooks:: Hooks are customization scripts used by various git commands. A handful of sample hooks are installed when - `git init-db` is run, but all of them are disabled by + `git init` is run, but all of them are disabled by default. To enable, they need to be made executable. Read link:hooks.html[hooks] for more details about each hook. @@ -95,7 +95,7 @@ Issues of note: repository itself. For example, you could: $ mkdir manual && cd manual - $ git init-db + $ git init $ git fetch-pack git://git.kernel.org/pub/scm/git/git.git man html | while read a b do diff --git a/builtin-init-db.c b/builtin-init-db.c index 22729f01ad..8e7540b692 100644 --- a/builtin-init-db.c +++ b/builtin-init-db.c @@ -56,7 +56,7 @@ static void copy_templates_1(char *path, int baselen, /* Note: if ".git/hooks" file exists in the repository being * re-initialized, /etc/core-git/templates/hooks/update would - * cause git-init-db to fail here. I think this is sane but + * cause git-init to fail here. I think this is sane but * it means that the set of templates we ship by default, along * with the way the namespace under .git/ is organized, should * be really carefully chosen. diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh index 1de14ea82f..975777f05e 100755 --- a/generate-cmdlist.sh +++ b/generate-cmdlist.sh @@ -22,7 +22,7 @@ commit diff fetch grep -init-db +init log merge mv diff --git a/git-archimport.perl b/git-archimport.perl index ada60ec240..2e15781246 100755 --- a/git-archimport.perl +++ b/git-archimport.perl @@ -226,7 +226,7 @@ my $import = 0; unless (-d $git_dir) { # initial import if ($psets[0]{type} eq 'i' || $psets[0]{type} eq 't') { print "Starting import from $psets[0]{id}\n"; - `git-init-db`; + `git-init`; die $! if $?; $import = 1; } else { diff --git a/git-clone.sh b/git-clone.sh index cf761b2c69..0f7bbbfb39 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -214,7 +214,7 @@ yes) GIT_DIR="$D" ;; *) GIT_DIR="$D/.git" ;; -esac && export GIT_DIR && git-init-db ${template+"$template"} || usage +esac && export GIT_DIR && git-init ${template+"$template"} || usage if test -n "$reference" then diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 1018f4f6fa..35ef0c0ee5 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -520,7 +520,7 @@ $orig_git_index = $ENV{GIT_INDEX_FILE} if exists $ENV{GIT_INDEX_FILE}; my %index; # holds filenames of one index per branch unless (-d $git_dir) { - system("git-init-db"); + system("git-init"); die "Cannot init the GIT db at $git_tree: $?\n" if $?; system("git-read-tree"); die "Cannot init an empty tree: $?\n" if $?; @@ -660,7 +660,7 @@ $ignorebranch{'#CVSPS_NO_BRANCH'} = 1; sub commit { if ($branch eq $opt_o && !$index{branch} && !get_headref($branch, $git_dir)) { # looks like an initial commit - # use the index primed by git-init-db + # use the index primed by git-init $ENV{GIT_INDEX_FILE} = '.git/index'; $index{$branch} = '.git/index'; } else { diff --git a/git-p4import.py b/git-p4import.py index 908941dd77..5c56cace0e 100644 --- a/git-p4import.py +++ b/git-p4import.py @@ -163,7 +163,7 @@ class git_command: self.gitdir = self.get_single("rev-parse --git-dir") report(2, "gdir:", self.gitdir) except: - die("Not a git repository... did you forget to \"git init-db\" ?") + die("Not a git repository... did you forget to \"git init\" ?") try: self.cdup = self.get_single("rev-parse --show-cdup") if self.cdup != "": diff --git a/git-svn.perl b/git-svn.perl index 56f17002d1..9986a0c9bb 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -286,7 +286,7 @@ sub init { $SVN_URL = $url; unless (-d $GIT_DIR) { - my @init_db = ('init-db'); + my @init_db = ('init'); push @init_db, "--template=$_template" if defined $_template; push @init_db, "--shared" if defined $_shared; command_noisy(@init_db); diff --git a/git-svnimport.perl b/git-svnimport.perl index f1f1a7dbed..3af8c7e110 100755 --- a/git-svnimport.perl +++ b/git-svnimport.perl @@ -285,7 +285,7 @@ my $last_rev = ""; my $last_branch; my $current_rev = $opt_s || 1; unless(-d $git_dir) { - system("git-init-db"); + system("git-init"); die "Cannot init the GIT db at $git_tree: $?\n" if $?; system("git-read-tree"); die "Cannot init an empty tree: $?\n" if $?; diff --git a/perl/Git.pm b/perl/Git.pm index 2b26b65bfb..3474ad320f 100644 --- a/perl/Git.pm +++ b/perl/Git.pm @@ -63,7 +63,7 @@ for doing easily operations which are not totally trivial to do over the generic command interface. While some commands can be executed outside of any context (e.g. 'version' -or 'init-db'), most operations require a repository context, which in practice +or 'init'), most operations require a repository context, which in practice means getting an instance of the Git object using the repository() constructor. (In the future, we will also get a new_repository() constructor.) All commands called as methods of the object are then executed in the context of the @@ -18,7 +18,7 @@ The easiest way to run tests is to say "make". This runs all the tests. *** t0000-basic.sh *** - * ok 1: .git/objects should be empty after git-init-db in an empty repo. + * ok 1: .git/objects should be empty after git-init in an empty repo. * ok 2: .git/objects should have 256 subdirectories. * ok 3: git-update-index without --add should fail adding. ... diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh index 0cd1c41866..186de70243 100755 --- a/t/t0000-basic.sh +++ b/t/t0000-basic.sh @@ -31,12 +31,12 @@ fi . ./test-lib.sh ################################################################ -# init-db has been done in an empty repository. +# git-init has been done in an empty repository. # make sure it is empty. find .git/objects -type f -print >should-be-empty test_expect_success \ - '.git/objects should be empty after git-init-db in an empty repo.' \ + '.git/objects should be empty after git-init in an empty repo.' \ 'cmp -s /dev/null should-be-empty' # also it should have 2 subdirectories; no fan-out anymore, pack, and info. diff --git a/t/t4116-apply-reverse.sh b/t/t4116-apply-reverse.sh index 74f5c2a575..aa2c869e0e 100755 --- a/t/t4116-apply-reverse.sh +++ b/t/t4116-apply-reverse.sh @@ -50,12 +50,12 @@ test_expect_success 'setup separate repository lacking postimage' ' git tar-tree initial initial | tar xf - && ( - cd initial && git init-db && git add . + cd initial && git init && git add . ) && git tar-tree second second | tar xf - && ( - cd second && git init-db && git add . + cd second && git init && git add . ) ' diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh index de45ac4e0f..f511547455 100755 --- a/t/t5300-pack-object.sh +++ b/t/t5300-pack-object.sh @@ -44,7 +44,7 @@ test_expect_success \ 'unpack without delta' \ "GIT_OBJECT_DIRECTORY=.git2/objects && export GIT_OBJECT_DIRECTORY && - git-init-db && + git-init && git-unpack-objects -n <test-1-${packname_1}.pack && git-unpack-objects <test-1-${packname_1}.pack" @@ -75,7 +75,7 @@ test_expect_success \ 'unpack with delta' \ 'GIT_OBJECT_DIRECTORY=.git2/objects && export GIT_OBJECT_DIRECTORY && - git-init-db && + git-init && git-unpack-objects -n <test-2-${packname_2}.pack && git-unpack-objects <test-2-${packname_2}.pack' @@ -100,7 +100,7 @@ test_expect_success \ 'use packed objects' \ 'GIT_OBJECT_DIRECTORY=.git2/objects && export GIT_OBJECT_DIRECTORY && - git-init-db && + git-init && cp test-1-${packname_1}.pack test-1-${packname_1}.idx .git2/objects/pack && { git-diff-tree --root -p $commit && while read object diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh index 77c3c575d8..ef78df67ea 100755 --- a/t/t5500-fetch-pack.sh +++ b/t/t5500-fetch-pack.sh @@ -97,7 +97,7 @@ pull_to_client () { ( mkdir client && cd client && - git-init-db 2>> log2.txt + git-init 2>> log2.txt ) add A1 diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh index 90eeeba2a3..3ce9446210 100755 --- a/t/t5510-fetch.sh +++ b/t/t5510-fetch.sh @@ -73,7 +73,7 @@ test_expect_success 'fetch following tags' ' mkdir four && cd four && - git init-db && + git init && git fetch .. :track && git show-ref --verify refs/tags/anno && diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index f841574573..7eb37838bb 100755 --- a/t/t5520-pull.sh +++ b/t/t5520-pull.sh @@ -17,7 +17,7 @@ test_expect_success setup ' test_expect_success 'pulling into void' ' mkdir cloned && cd cloned && - git init-db && + git init && git pull .. ' diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh index 2f4ff82e14..344033249c 100755 --- a/t/t7001-mv.sh +++ b/t/t7001-mv.sh @@ -88,7 +88,7 @@ test_expect_success \ test_expect_success "Michael Cassar's test case" ' rm -fr .git papers partA && - git init-db && + git init && mkdir -p papers/unsorted papers/all-papers partA && echo a > papers/unsorted/Thesis.pdf && echo b > partA/outline.txt && @@ -109,7 +109,7 @@ rm -fr papers partA path? test_expect_success "Sergey Vlasov's test case" ' rm -fr .git && - git init-db && + git init && mkdir ab && date >ab.c && date >ab/d && diff --git a/t/test-lib.sh b/t/test-lib.sh index 72ea2b2598..8e3ee6cd7b 100755 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -220,8 +220,8 @@ test_create_repo () { repo="$1" mkdir "$repo" cd "$repo" || error "Cannot setup test environment" - "$GIT_EXEC_PATH/git" init-db --template=$GIT_EXEC_PATH/templates/blt/ >/dev/null 2>&1 || - error "cannot run git init-db -- have you built things yet?" + "$GIT_EXEC_PATH/git" init --template=$GIT_EXEC_PATH/templates/blt/ >/dev/null 2>&1 || + error "cannot run git init -- have you built things yet?" mv .git/hooks .git/hooks-disabled cd "$owd" } |