Skip to content

Commit 74b819a

Browse files
committed
Merge branch 'jc/tag-doc' into maint-1.7.11
Our documentation used to assume having files in .git/refs/* directories was the only to have branches and tags, but that is not true for quite some time. * jc/tag-doc: Documentation: do not mention .git/refs/* directories
2 parents c247d76 + 831e61f commit 74b819a

File tree

7 files changed

+27
-16
lines changed

7 files changed

+27
-16
lines changed

Documentation/git-describe.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ OPTIONS
3636

3737
--all::
3838
Instead of using only the annotated tags, use any ref
39-
found in `.git/refs/`. This option enables matching
39+
found in `refs/` namespace. This option enables matching
4040
any known branch, remote-tracking branch, or lightweight tag.
4141

4242
--tags::
4343
Instead of using only the annotated tags, use any tag
44-
found in `.git/refs/tags`. This option enables matching
44+
found in `refs/tags` namespace. This option enables matching
4545
a lightweight (non-annotated) tag.
4646

4747
--contains::

Documentation/git-filter-branch.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ changes, which would normally have no effect. Nevertheless, this may be
3232
useful in the future for compensating for some git bugs or such,
3333
therefore such a usage is permitted.
3434

35-
*NOTE*: This command honors `.git/info/grafts` and `.git/refs/replace/`.
35+
*NOTE*: This command honors `.git/info/grafts` file and refs in
36+
the `refs/replace/` namespace.
3637
If you have any grafts or replacement refs defined, running this command
3738
will make them permanent.
3839

Documentation/git-fsck.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ OPTIONS
2323
An object to treat as the head of an unreachability trace.
2424
+
2525
If no objects are given, 'git fsck' defaults to using the
26-
index file, all SHA1 references in .git/refs/*, and all reflogs (unless
27-
--no-reflogs is given) as heads.
26+
index file, all SHA1 references in `refs` namespace, and all reflogs
27+
(unless --no-reflogs is given) as heads.
2828

2929
--unreachable::
3030
Print out objects that exist but that aren't reachable from any

Documentation/git-lost-found.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ $ gitk $(cd .git/lost-found/commit && echo ??*)
4848
------------
4949

5050
After making sure you know which the object is the tag you are looking
51-
for, you can reconnect it to your regular .git/refs hierarchy.
51+
for, you can reconnect it to your regular `refs` hierarchy by using
52+
the `update-ref` command.
5253

5354
------------
5455
$ git cat-file -t 1ef2b196

Documentation/git-pack-refs.txt

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,23 @@ DESCRIPTION
1414
-----------
1515

1616
Traditionally, tips of branches and tags (collectively known as
17-
'refs') were stored one file per ref under `$GIT_DIR/refs`
17+
'refs') were stored one file per ref in a (sub)directory
18+
under `$GIT_DIR/refs`
1819
directory. While many branch tips tend to be updated often,
1920
most tags and some branch tips are never updated. When a
2021
repository has hundreds or thousands of tags, this
2122
one-file-per-ref format both wastes storage and hurts
2223
performance.
2324

2425
This command is used to solve the storage and performance
25-
problem by stashing the refs in a single file,
26+
problem by storing the refs in a single file,
2627
`$GIT_DIR/packed-refs`. When a ref is missing from the
27-
traditional `$GIT_DIR/refs` hierarchy, it is looked up in this
28+
traditional `$GIT_DIR/refs` directory hierarchy, it is looked
29+
up in this
2830
file and used if found.
2931

3032
Subsequent updates to branches always create new files under
31-
`$GIT_DIR/refs` hierarchy.
33+
`$GIT_DIR/refs` directory hierarchy.
3234

3335
A recommended practice to deal with a repository with too many
3436
refs is to pack its refs with `--all --prune` once, and
@@ -57,6 +59,15 @@ a repository with many branches of historical interests.
5759
The command usually removes loose refs under `$GIT_DIR/refs`
5860
hierarchy after packing them. This option tells it not to.
5961

62+
63+
BUGS
64+
----
65+
66+
Older documentation written before the packed-refs mechanism was
67+
introduced may still say things like ".git/refs/heads/<branch> file
68+
exists" when it means "branch <branch> exists".
69+
70+
6071
GIT
6172
---
6273
Part of the linkgit:git[1] suite

Documentation/git-replace.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,13 @@ SYNOPSIS
1414

1515
DESCRIPTION
1616
-----------
17-
Adds a 'replace' reference in `.git/refs/replace/`
17+
Adds a 'replace' reference in `refs/replace/` namespace.
1818

1919
The name of the 'replace' reference is the SHA1 of the object that is
2020
replaced. The content of the 'replace' reference is the SHA1 of the
2121
replacement object.
2222

23-
Unless `-f` is given, the 'replace' reference must not yet exist in
24-
`.git/refs/replace/` directory.
23+
Unless `-f` is given, the 'replace' reference must not yet exist.
2524

2625
Replacement references will be used by default by all git commands
2726
except those doing reachability traversal (prune, pack transfer and

Documentation/git-tag.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ SYNOPSIS
2020
DESCRIPTION
2121
-----------
2222

23-
Add a tag reference in `.git/refs/tags/`, unless `-d/-l/-v` is given
23+
Add a tag reference in `refs/tags/`, unless `-d/-l/-v` is given
2424
to delete, list or verify tags.
2525

26-
Unless `-f` is given, the tag to be created must not yet exist in the
27-
`.git/refs/tags/` directory.
26+
Unless `-f` is given, the named tag must not yet exist.
2827

2928
If one of `-a`, `-s`, or `-u <key-id>` is passed, the command
3029
creates a 'tag' object, and requires a tag message. Unless

0 commit comments

Comments
 (0)