Skip to content

Commit 3d3d282

Browse files
Ben Waltongitster
authored andcommitted
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>
1 parent 885b797 commit 3d3d282

File tree

1 file changed

+27
-31
lines changed

1 file changed

+27
-31
lines changed

Documentation/gitrepository-layout.txt

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -23,32 +23,25 @@ objects::
2323
Object store associated with this repository. Usually
2424
an object store is self sufficient (i.e. all the objects
2525
that are referred to by an object found in it are also
26-
found in it), but there are couple of ways to violate
27-
it.
26+
found in it), but there are a few ways to violate it.
2827
+
29-
. You could populate the repository by running a commit walker
30-
without `-a` option. Depending on which options are given, you
31-
could have only commit objects without associated blobs and
32-
trees this way, for example. A repository with this kind of
33-
incomplete object store is not suitable to be published to the
34-
outside world but sometimes useful for private repository.
35-
. You also could have an incomplete but locally usable repository
36-
by cloning shallowly. See linkgit:git-clone[1].
37-
. You can be using `objects/info/alternates` mechanism, or
38-
`$GIT_ALTERNATE_OBJECT_DIRECTORIES` mechanism to 'borrow'
28+
. You could have an incomplete but locally usable repository
29+
by creating a shallow clone. See linkgit:git-clone[1].
30+
. You could be using the `objects/info/alternates` or
31+
`$GIT_ALTERNATE_OBJECT_DIRECTORIES` mechanisms to 'borrow'
3932
objects from other object stores. A repository with this kind
4033
of incomplete object store is not suitable to be published for
4134
use with dumb transports but otherwise is OK as long as
42-
`objects/info/alternates` points at the right object stores
43-
it borrows from.
35+
`objects/info/alternates` points at the object stores it
36+
borrows from.
4437

4538
objects/[0-9a-f][0-9a-f]::
46-
Traditionally, each object is stored in its own file.
47-
They are split into 256 subdirectories using the first
48-
two letters from its object name to keep the number of
49-
directory entries `objects` directory itself needs to
50-
hold. Objects found here are often called 'unpacked'
51-
(or 'loose') objects.
39+
A newly created object is stored in its own file.
40+
The objects are splayed over 256 subdirectories using
41+
the first two characters of the sha1 object name to
42+
keep the number of directory entries in `objects`
43+
itself to a manageable number. Objects found
44+
here are often called 'unpacked' (or 'loose') objects.
5245

5346
objects/pack::
5447
Packs (files that store many object in compressed form,
@@ -85,7 +78,7 @@ objects/info/http-alternates::
8578

8679
refs::
8780
References are stored in subdirectories of this
88-
directory. The 'git prune' command knows to keep
81+
directory. The 'git prune' command knows to preserve
8982
objects reachable from refs found in this directory and
9083
its subdirectories.
9184

@@ -119,16 +112,17 @@ HEAD::
119112
+
120113
HEAD can also record a specific commit directly, instead of
121114
being a symref to point at the current branch. Such a state
122-
is often called 'detached HEAD', and almost all commands work
123-
identically as normal. See linkgit:git-checkout[1] for
124-
details.
115+
is often called 'detached HEAD.' See linkgit:git-checkout[1]
116+
for details.
125117

126118
branches::
127119
A slightly deprecated way to store shorthands to be used
128-
to specify URL to 'git fetch', 'git pull' and 'git push'
129-
commands is to store a file in `branches/<name>` and
130-
give 'name' to these commands in place of 'repository'
131-
argument.
120+
to specify a URL to 'git fetch', 'git pull' and 'git push'.
121+
A file can be stored as `branches/<name>` and then
122+
'name' can be given to these commands in place of
123+
'repository' argument. See the REMOTES section in
124+
linkgit:git-fetch[1] for details. This mechanism is legacy
125+
and not likely to be found in modern repositories.
132126

133127
hooks::
134128
Hooks are customization scripts used by various git
@@ -173,9 +167,11 @@ info/exclude::
173167
at it. See also: linkgit:gitignore[5].
174168

175169
remotes::
176-
Stores shorthands to be used to give URL and default
177-
refnames to interact with remote repository to
178-
'git fetch', 'git pull' and 'git push' commands.
170+
Stores shorthands for URL and default refnames for use
171+
when interacting with remote repositories via 'git fetch',
172+
'git pull' and 'git push' commands. See the REMOTES section
173+
in linkgit:git-fetch[1] for details. This mechanism is legacy
174+
and not likely to be found in modern repositories.
179175

180176
logs::
181177
Records of changes made to refs are stored in this

0 commit comments

Comments
 (0)