Documentation: Grammar correction, wording fixes and cleanup

Correct a few grammar issues in gitrepository-layout.txt and also
rewords a few sections for clarity.

Remove references to using http-fetch without -a to create a broken
repository.

Mark a few areas of the repository structure as legacy.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ben Walton 2011-08-23 20:32:35 -04:00 committed by Junio C Hamano
parent 885b797a4a
commit 3d3d282146

View File

@ -23,32 +23,25 @@ objects::
Object store associated with this repository. Usually Object store associated with this repository. Usually
an object store is self sufficient (i.e. all the objects an object store is self sufficient (i.e. all the objects
that are referred to by an object found in it are also that are referred to by an object found in it are also
found in it), but there are couple of ways to violate found in it), but there are a few ways to violate it.
it.
+ +
. You could populate the repository by running a commit walker . You could have an incomplete but locally usable repository
without `-a` option. Depending on which options are given, you by creating a shallow clone. See linkgit:git-clone[1].
could have only commit objects without associated blobs and . You could be using the `objects/info/alternates` or
trees this way, for example. A repository with this kind of `$GIT_ALTERNATE_OBJECT_DIRECTORIES` mechanisms to 'borrow'
incomplete object store is not suitable to be published to the
outside world but sometimes useful for private repository.
. You also could have an incomplete but locally usable repository
by cloning shallowly. See linkgit:git-clone[1].
. You can be using `objects/info/alternates` mechanism, or
`$GIT_ALTERNATE_OBJECT_DIRECTORIES` mechanism to 'borrow'
objects from other object stores. A repository with this kind objects from other object stores. A repository with this kind
of incomplete object store is not suitable to be published for of incomplete object store is not suitable to be published for
use with dumb transports but otherwise is OK as long as use with dumb transports but otherwise is OK as long as
`objects/info/alternates` points at the right object stores `objects/info/alternates` points at the object stores it
it borrows from. borrows from.
objects/[0-9a-f][0-9a-f]:: objects/[0-9a-f][0-9a-f]::
Traditionally, each object is stored in its own file. A newly created object is stored in its own file.
They are split into 256 subdirectories using the first The objects are splayed over 256 subdirectories using
two letters from its object name to keep the number of the first two characters of the sha1 object name to
directory entries `objects` directory itself needs to keep the number of directory entries in `objects`
hold. Objects found here are often called 'unpacked' itself to a manageable number. Objects found
(or 'loose') objects. here are often called 'unpacked' (or 'loose') objects.
objects/pack:: objects/pack::
Packs (files that store many object in compressed form, Packs (files that store many object in compressed form,
@ -85,7 +78,7 @@ objects/info/http-alternates::
refs:: refs::
References are stored in subdirectories of this References are stored in subdirectories of this
directory. The 'git prune' command knows to keep directory. The 'git prune' command knows to preserve
objects reachable from refs found in this directory and objects reachable from refs found in this directory and
its subdirectories. its subdirectories.
@ -119,16 +112,17 @@ HEAD::
+ +
HEAD can also record a specific commit directly, instead of HEAD can also record a specific commit directly, instead of
being a symref to point at the current branch. Such a state being a symref to point at the current branch. Such a state
is often called 'detached HEAD', and almost all commands work is often called 'detached HEAD.' See linkgit:git-checkout[1]
identically as normal. See linkgit:git-checkout[1] for for details.
details.
branches:: branches::
A slightly deprecated way to store shorthands to be used A slightly deprecated way to store shorthands to be used
to specify URL to 'git fetch', 'git pull' and 'git push' to specify a URL to 'git fetch', 'git pull' and 'git push'.
commands is to store a file in `branches/<name>` and A file can be stored as `branches/<name>` and then
give 'name' to these commands in place of 'repository' 'name' can be given to these commands in place of
argument. 'repository' argument. See the REMOTES section in
linkgit:git-fetch[1] for details. This mechanism is legacy
and not likely to be found in modern repositories.
hooks:: hooks::
Hooks are customization scripts used by various git Hooks are customization scripts used by various git
@ -173,9 +167,11 @@ info/exclude::
at it. See also: linkgit:gitignore[5]. at it. See also: linkgit:gitignore[5].
remotes:: remotes::
Stores shorthands to be used to give URL and default Stores shorthands for URL and default refnames for use
refnames to interact with remote repository to when interacting with remote repositories via 'git fetch',
'git fetch', 'git pull' and 'git push' commands. 'git pull' and 'git push' commands. See the REMOTES section
in linkgit:git-fetch[1] for details. This mechanism is legacy
and not likely to be found in modern repositories.
logs:: logs::
Records of changes made to refs are stored in this Records of changes made to refs are stored in this