Skip to content

Commit b56735e

Browse files
committed
Merge branch 'maint'
* maint: docs: don't talk about $GIT_DIR/refs/ everywhere
2 parents 44e0f45 + cc1b8d8 commit b56735e

10 files changed

+39
-36
lines changed

Documentation/git-check-ref-format.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ status if it is not.
1919

2020
A reference is used in git to specify branches and tags. A
2121
branch head is stored under the `$GIT_DIR/refs/heads` directory, and
22-
a tag is stored under the `$GIT_DIR/refs/tags` directory. git
23-
imposes the following rules on how references are named:
22+
a tag is stored under the `$GIT_DIR/refs/tags` directory (or, if refs
23+
are packed by `git gc`, as entries in the `$GIT_DIR/packed-refs` file).
24+
git imposes the following rules on how references are named:
2425

2526
. They can include slash `/` for hierarchical (directory)
2627
grouping, but no slash-separated component can begin with a

Documentation/git-clone.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ arguments will in addition merge the remote master branch into the
2929
current master branch, if any.
3030

3131
This default configuration is achieved by creating references to
32-
the remote branch heads under `$GIT_DIR/refs/remotes/origin` and
32+
the remote branch heads under `refs/remotes/origin` and
3333
by initializing `remote.origin.url` and `remote.origin.fetch`
3434
configuration variables.
3535

Documentation/git-fetch-pack.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ higher level wrapper of this command, instead.
1818
Invokes 'git-upload-pack' on a possibly remote repository
1919
and asks it to send objects missing from this repository, to
2020
update the named heads. The list of commits available locally
21-
is found out by scanning local $GIT_DIR/refs/ and sent to
21+
is found out by scanning the local refs/ hierarchy and sent to
2222
'git-upload-pack' running on the other end.
2323

2424
This command degenerates to download everything to complete the

Documentation/git-pack-objects.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ base-name::
7373
--all::
7474
This implies `--revs`. In addition to the list of
7575
revision arguments read from the standard input, pretend
76-
as if all refs under `$GIT_DIR/refs` are specified to be
76+
as if all refs under `refs/` are specified to be
7777
included.
7878

7979
--include-tag::

Documentation/git-prune.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ NOTE: In most cases, users should run 'git gc', which calls
1717
'git prune'. See the section "NOTES", below.
1818

1919
This runs 'git fsck --unreachable' using all the refs
20-
available in `$GIT_DIR/refs`, optionally with additional set of
20+
available in `refs/`, optionally with additional set of
2121
objects specified on the command line, and prunes all unpacked
2222
objects unreachable from any of these head objects from the object database.
2323
In addition, it

Documentation/git-push.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ nor in any Push line of the corresponding remotes file---see below).
6969

7070
--all::
7171
Instead of naming each ref to push, specifies that all
72-
refs under `$GIT_DIR/refs/heads/` be pushed.
72+
refs under `refs/heads/` be pushed.
7373

7474
--mirror::
7575
Instead of naming each ref to push, specifies that all
76-
refs under `$GIT_DIR/refs/` (which includes but is not
76+
refs under `refs/` (which includes but is not
7777
limited to `refs/heads/`, `refs/remotes/`, and `refs/tags/`)
7878
be mirrored to the remote repository. Newly created local
7979
refs will be pushed to the remote end, locally updated refs
@@ -96,7 +96,7 @@ nor in any Push line of the corresponding remotes file---see below).
9696
the same as prefixing all refs with a colon.
9797

9898
--tags::
99-
All refs under `$GIT_DIR/refs/tags` are pushed, in
99+
All refs under `refs/tags` are pushed, in
100100
addition to refspecs explicitly listed on the command
101101
line.
102102

Documentation/git-rev-parse.txt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,14 @@ OPTIONS
101101
abbreviation mode.
102102

103103
--all::
104-
Show all refs found in `$GIT_DIR/refs`.
104+
Show all refs found in `refs/`.
105105

106106
--branches[=pattern]::
107107
--tags[=pattern]::
108108
--remotes[=pattern]::
109109
Show all branches, tags, or remote-tracking branches,
110-
respectively (i.e., refs found in `$GIT_DIR/refs/heads`,
111-
`$GIT_DIR/refs/tags`, or `$GIT_DIR/refs/remotes`,
112-
respectively).
110+
respectively (i.e., refs found in `refs/heads`,
111+
`refs/tags`, or `refs/remotes`, respectively).
113112
+
114113
If a `pattern` is given, only refs matching the given shell glob are
115114
shown. If the pattern does not contain a globbing character (`?`,
@@ -189,7 +188,7 @@ blobs contained in a commit.
189188
`g`, and an abbreviated object name.
190189

191190
* A symbolic ref name. E.g. 'master' typically means the commit
192-
object referenced by $GIT_DIR/refs/heads/master. If you
191+
object referenced by refs/heads/master. If you
193192
happen to have both heads/master and tags/master, you can
194193
explicitly say 'heads/master' to tell git which one you mean.
195194
When ambiguous, a `<name>` is disambiguated by taking the
@@ -198,15 +197,15 @@ blobs contained in a commit.
198197
. if `$GIT_DIR/<name>` exists, that is what you mean (this is usually
199198
useful only for `HEAD`, `FETCH_HEAD`, `ORIG_HEAD` and `MERGE_HEAD`);
200199

201-
. otherwise, `$GIT_DIR/refs/<name>` if exists;
200+
. otherwise, `refs/<name>` if exists;
202201

203-
. otherwise, `$GIT_DIR/refs/tags/<name>` if exists;
202+
. otherwise, `refs/tags/<name>` if exists;
204203

205-
. otherwise, `$GIT_DIR/refs/heads/<name>` if exists;
204+
. otherwise, `refs/heads/<name>` if exists;
206205

207-
. otherwise, `$GIT_DIR/refs/remotes/<name>` if exists;
206+
. otherwise, `refs/remotes/<name>` if exists;
208207

209-
. otherwise, `$GIT_DIR/refs/remotes/<name>/HEAD` if exists.
208+
. otherwise, `refs/remotes/<name>/HEAD` if exists.
210209
+
211210
HEAD names the commit your changes in the working tree is based on.
212211
FETCH_HEAD records the branch you fetched from a remote repository
@@ -217,6 +216,9 @@ you can change the tip of the branch back to the state before you ran
217216
them easily.
218217
MERGE_HEAD records the commit(s) you are merging into your branch
219218
when you run 'git merge'.
219+
+
220+
Note that any of the `refs/*` cases above may come either from
221+
the `$GIT_DIR/refs` directory or from the `$GIT_DIR/packed-refs` file.
220222

221223
* A ref followed by the suffix '@' with a date specification
222224
enclosed in a brace

Documentation/git-show-branch.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ DESCRIPTION
2020
-----------
2121

2222
Shows the commit ancestry graph starting from the commits named
23-
with <rev>s or <globs>s (or all refs under $GIT_DIR/refs/heads
24-
and/or $GIT_DIR/refs/tags) semi-visually.
23+
with <rev>s or <globs>s (or all refs under refs/heads
24+
and/or refs/tags) semi-visually.
2525

2626
It cannot show more than 29 branches and commits at a time.
2727

@@ -37,8 +37,8 @@ OPTIONS
3737

3838
<glob>::
3939
A glob pattern that matches branch or tag names under
40-
$GIT_DIR/refs. For example, if you have many topic
41-
branches under $GIT_DIR/refs/heads/topic, giving
40+
refs/. For example, if you have many topic
41+
branches under refs/heads/topic, giving
4242
`topic/*` would show all of them.
4343

4444
-r::
@@ -176,7 +176,7 @@ EXAMPLE
176176
-------
177177

178178
If you keep your primary branches immediately under
179-
`$GIT_DIR/refs/heads`, and topic branches in subdirectories of
179+
`refs/heads`, and topic branches in subdirectories of
180180
it, having the following in the configuration file may help:
181181

182182
------------

Documentation/git-stash.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ A stash is by default listed as "WIP on 'branchname' ...", but
3333
you can give a more descriptive message on the command line when
3434
you create one.
3535

36-
The latest stash you created is stored in `$GIT_DIR/refs/stash`; older
36+
The latest stash you created is stored in `refs/stash`; older
3737
stashes are found in the reflog of this reference and can be named using
3838
the usual reflog syntax (e.g. `stash@\{0}` is the most recently
3939
created stash, `stash@\{1}` is the one before it, `stash@\{2.hours.ago}`

Documentation/rev-list-options.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -225,26 +225,26 @@ endif::git-rev-list[]
225225

226226
--all::
227227

228-
Pretend as if all the refs in `$GIT_DIR/refs/` are listed on the
228+
Pretend as if all the refs in `refs/` are listed on the
229229
command line as '<commit>'.
230230

231231
--branches[=pattern]::
232232

233-
Pretend as if all the refs in `$GIT_DIR/refs/heads` are listed
233+
Pretend as if all the refs in `refs/heads` are listed
234234
on the command line as '<commit>'. If `pattern` is given, limit
235235
branches to ones matching given shell glob. If pattern lacks '?',
236236
'*', or '[', '/*' at the end is implied.
237237

238238
--tags[=pattern]::
239239

240-
Pretend as if all the refs in `$GIT_DIR/refs/tags` are listed
240+
Pretend as if all the refs in `refs/tags` are listed
241241
on the command line as '<commit>'. If `pattern` is given, limit
242242
tags to ones matching given shell glob. If pattern lacks '?', '*',
243243
or '[', '/*' at the end is implied.
244244

245245
--remotes[=pattern]::
246246

247-
Pretend as if all the refs in `$GIT_DIR/refs/remotes` are listed
247+
Pretend as if all the refs in `refs/remotes` are listed
248248
on the command line as '<commit>'. If `pattern`is given, limit
249249
remote tracking branches to ones matching given shell glob.
250250
If pattern lacks '?', '*', or '[', '/*' at the end is implied.
@@ -259,9 +259,9 @@ endif::git-rev-list[]
259259
ifndef::git-rev-list[]
260260
--bisect::
261261

262-
Pretend as if the bad bisection ref `$GIT_DIR/refs/bisect/bad`
262+
Pretend as if the bad bisection ref `refs/bisect/bad`
263263
was listed and as if it was followed by `--not` and the good
264-
bisection refs `$GIT_DIR/refs/bisect/good-*` on the command
264+
bisection refs `refs/bisect/good-*` on the command
265265
line.
266266
endif::git-rev-list[]
267267

@@ -561,10 +561,10 @@ Bisection Helpers
561561

562562
Limit output to the one commit object which is roughly halfway between
563563
included and excluded commits. Note that the bad bisection ref
564-
`$GIT_DIR/refs/bisect/bad` is added to the included commits (if it
565-
exists) and the good bisection refs `$GIT_DIR/refs/bisect/good-*` are
564+
`refs/bisect/bad` is added to the included commits (if it
565+
exists) and the good bisection refs `refs/bisect/good-*` are
566566
added to the excluded commits (if they exist). Thus, supposing there
567-
are no refs in `$GIT_DIR/refs/bisect/`, if
567+
are no refs in `refs/bisect/`, if
568568

569569
-----------------------------------------------------------------------
570570
$ git rev-list --bisect foo ^bar ^baz
@@ -585,7 +585,7 @@ one.
585585
--bisect-vars::
586586

587587
This calculates the same as `--bisect`, except that refs in
588-
`$GIT_DIR/refs/bisect/` are not used, and except that this outputs
588+
`refs/bisect/` are not used, and except that this outputs
589589
text ready to be eval'ed by the shell. These lines will assign the
590590
name of the midpoint revision to the variable `bisect_rev`, and the
591591
expected number of commits to be tested after `bisect_rev` is tested
@@ -599,7 +599,7 @@ number of commits to be tested if `bisect_rev` turns out to be bad to
599599

600600
This outputs all the commit objects between the included and excluded
601601
commits, ordered by their distance to the included and excluded
602-
commits. Refs in `$GIT_DIR/refs/bisect/` are not used. The farthest
602+
commits. Refs in `refs/bisect/` are not used. The farthest
603603
from them is displayed first. (This is the only one displayed by
604604
`--bisect`.)
605605
+

0 commit comments

Comments
 (0)