Skip to content

Commit c1bdacf

Browse files
lbtJunio C Hamano
authored andcommitted
[PATCH 3/4] split core-git.txt and update
Update git environment variable docs Update first section of command docs (Manipulation commands section) Signed-off-by: David Greaves <david@dgreaves.com>
1 parent 204ee6a commit c1bdacf

File tree

8 files changed

+128
-20
lines changed

8 files changed

+128
-20
lines changed

Documentation/git-check-files.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ preparing to update file <file> not uptodate in cache::
3131
Exits with a status code indicating success if all files are
3232
up-to-date.
3333

34-
see also: link:git-update-cache.html[git-update-cache]
34+
See Also
35+
--------
36+
link:git-update-cache.html[git-update-cache]
3537

3638

3739
Author

Documentation/git-commit-tree.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,14 @@ A commit comment is read from stdin (max 999 chars). If a changelog
6464
entry is not provided via '<' redirection, "git-commit-tree" will just wait
6565
for one to be entered and terminated with ^D
6666

67-
see also: link:git-write-tree.html[git-write-tree]
67+
Diagnostics
68+
-----------
69+
You don't exist. Go away!::
70+
The passwd(5) gecos field couldn't be read
71+
72+
See Also
73+
--------
74+
link:git-write-tree.html[git-write-tree]
6875

6976

7077
Author

Documentation/git-diff-tree-helper.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ OPTIONS
3030
+
3131
would show a diff to bring the working file back to what is in the <tree>.
3232

33-
See also the section on generating patches in link:git-diff-cache.html[git-diff-cache]
33+
See Also
34+
--------
35+
The section on generating patches in link:git-diff-cache.html[git-diff-cache]
3436

3537

3638
Author

Documentation/git-init-db.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ DESCRIPTION
1616
This simply creates an empty git object database - basically a `.git`
1717
directory and `.git/object/??/` directories.
1818

19+
If the 'GIT_DIR' environment variable is set then it specifies a path
20+
to use instead of `./.git` for the base of the repository.
21+
1922
If the object storage directory is specified via the 'GIT_OBJECT_DIRECTORY'
2023
environment variable then the sha1 directories are created underneath -
2124
otherwise the default `.git/objects` directory is used.

Documentation/git-ls-files.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ the dircache records up to three such pairs; one from tree O in stage
8383
the user (or Cogito) to see what should eventually be recorded at the
8484
path. (see read-cache for more information on state)
8585

86-
see also: link:read-cache.html[read-cache]
86+
See Also
87+
--------
88+
link:read-cache.html[read-cache]
8789

8890

8991
Author

Documentation/git-mktag.txt

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,29 @@ git-mktag - Creates a tag object
99

1010
SYNOPSIS
1111
--------
12-
'git-mktag'
12+
'git-mktag' < signature_file
1313

1414
DESCRIPTION
1515
-----------
16-
Reads a tag contents from its standard input and creates a tag object.
17-
The input must be a well formed tag object.
16+
Reads a tag contents on standard input and creates a tag object
17+
that can also be used to sign other objects.
18+
19+
The output is the new tag's <object> identifier.
20+
21+
Tag Format
22+
----------
23+
A tag signature file has a very simple fixed format: three lines of
24+
25+
object <sha1>
26+
type <typename>
27+
tag <tagname>
28+
29+
followed by some 'optional' free-form signature that git itself
30+
doesn't care about, but that can be verified with gpg or similar.
31+
32+
The size of the full object is artificially limited to 8kB. (Just
33+
because I'm a lazy bastard, and if you can't fit a signature in that
34+
size, you're doing something wrong)
1835

1936

2037
Author

Documentation/git-read-tree.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ SYNOPSIS
1414
DESCRIPTION
1515
-----------
1616
Reads the tree information given by <tree> into the directory cache,
17-
but does not actually _update_ any of the files it "caches". (see:
17+
but does not actually *update* any of the files it "caches". (see:
1818
git-checkout-cache)
1919

2020
Optionally, it can merge a tree into the cache or perform a 3-way
@@ -133,7 +133,9 @@ the index file, which is a temporary thing anyway. There is no need to
133133
worry about what is in the working directory, since it is never shown
134134
and never used.
135135

136-
see also: link:git-write-tree.html[git-write-tree], link:git-ls-files.html[git-ls-files]
136+
See Also
137+
--------
138+
link:git-write-tree.html[git-write-tree]; link:git-ls-files.html[git-ls-files]
137139

138140

139141
Author

Documentation/git.txt

Lines changed: 84 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,44 @@ Identifier terminology
190190
Indicates a filename - always relative to the root of
191191
the tree structure GIT_INDEX_FILE describes.
192192

193+
Symbolic Identifiers
194+
--------------------
195+
Any git comand accepting any <object> can also use the following symbolic notation:
196+
197+
HEAD::
198+
indicates the head of the repository (ie the contents of `$GIT_DIR/HEAD`)
199+
<tag>::
200+
a valid tag 'name'+
201+
(ie the contents of `$GIT_DIR/refs/tags/<tag>`)
202+
<head>::
203+
a valid head 'name'+
204+
(ie the contents of `$GIT_DIR/refs/heads/<head>`)
205+
<snap>::
206+
a valid snapshot 'name'+
207+
(ie the contents of `$GIT_DIR/refs/snap/<snap>`)
208+
209+
210+
File/Directory Structure
211+
------------------------
212+
The git-core manipulates the following areas in the directory:
213+
214+
.git/ The base (overridden with $GIT_DIR)
215+
objects/ The object base (overridden with $GIT_OBJECT_DIRECTORY)
216+
??/ 'First 2 chars of object' directories
217+
218+
It can interrogate (but never updates) the following areas:
219+
220+
refs/ Directories containing symbolic names for objects
221+
(each file contains the hex SHA1 + newline)
222+
heads/ Commits which are heads of various sorts
223+
tags/ Tags, by the tag name (or some local renaming of it)
224+
snap/ ????
225+
... Everything else isn't shared
226+
HEAD Symlink to refs/heads/<something>
227+
228+
Higher level SCMs may provide and manage additional information in the
229+
GIT_DIR.
230+
193231
Terminology
194232
-----------
195233
Each line contains terms used interchangeably
@@ -210,17 +248,52 @@ Environment Variables
210248
---------------------
211249
Various git commands use the following environment variables:
212250

213-
- 'GIT_AUTHOR_NAME'
214-
- 'GIT_AUTHOR_EMAIL'
215-
- 'GIT_AUTHOR_DATE'
216-
- 'GIT_COMMITTER_NAME'
217-
- 'GIT_COMMITTER_EMAIL'
218-
- 'GIT_DIFF_OPTS'
219-
- 'GIT_EXTERNAL_DIFF'
220-
- 'GIT_INDEX_FILE'
221-
- 'GIT_OBJECT_DIRECTORY'
222-
- 'GIT_ALTERNATE_OBJECT_DIRECTORIES'
223-
251+
The git Repository
252+
~~~~~~~~~~~~~~~~~~
253+
These environment variables apply to 'all' core git commands. Nb: it
254+
is worth noting that they may be used/overridden by SCMS sitting above
255+
git so take care if using Cogito etc
256+
257+
'GIT_INDEX_FILE'::
258+
This environment allows the specification of an alternate
259+
cache/index file. If not specified, the default of
260+
`$GIT_DIR/index` is used.
261+
262+
'GIT_OBJECT_DIRECTORY'::
263+
If the object storage directory is specified via this
264+
environment variable then the sha1 directories are created
265+
underneath - otherwise the default `$GIT_DIR/objects`
266+
directory is used.
267+
268+
'GIT_ALTERNATE_OBJECT_DIRECTORIES'::
269+
Due to the immutable nature of git objects, old objects can be
270+
archived into shared, read-only directories. This variable
271+
specifies a ":" seperated list of git object directories which
272+
can be used to search for git objects. New objects will not be
273+
written to these directories.
274+
275+
'GIT_DIR'::
276+
If the 'GIT_DIR' environment variable is set then it specifies
277+
a path to use instead of `./.git` for the base of the
278+
repository.
279+
280+
git Commits
281+
~~~~~~~~~~~
282+
'GIT_AUTHOR_NAME'::
283+
'GIT_AUTHOR_EMAIL'::
284+
'GIT_AUTHOR_DATE'::
285+
'GIT_COMMITTER_NAME'::
286+
'GIT_COMMITTER_EMAIL'::
287+
see link:git-commit-tree.html[git-commit-tree]
288+
289+
git Diffs
290+
~~~~~~~~~
291+
GIT_DIFF_OPTS::
292+
GIT_EXTERNAL_DIFF::
293+
see the "generating patches" section in :
294+
link:git-diff-cache.html[git-diff-cache];
295+
link:git-diff-files.html[git-diff-files];
296+
link:git-diff-tree.html[git-diff-tree]
224297

225298
Author
226299
------

0 commit comments

Comments
 (0)