Skip to content

Commit 198a4f4

Browse files
Petr BaudisJunio C Hamano
authored andcommitted
Documentation: Correct alternates documentation, document http-alternates
For one, the documentation invalidly claimed that the paths have to be absolute when that's not the case and in fact there is a very valid reason not to use absolute paths (documented the reason as well). Signed-off-by: Petr Baudis <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e3d457f commit 198a4f4

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

Documentation/repository-layout.txt

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,20 @@ objects/info/packs::
5252
by default.
5353

5454
objects/info/alternates::
55-
This file records absolute filesystem paths of alternate
56-
object stores that this object store borrows objects
57-
from, one pathname per line.
55+
This file records paths to alternate object stores that
56+
this object store borrows objects from, one pathname per
57+
line. Note that not only native Git tools use it locally,
58+
but the HTTP fetcher also tries to use it remotely; this
59+
will usually work if you have relative paths (relative
60+
to the object database, not to the repository!) in your
61+
alternates file, but it will not work if you use absolute
62+
paths unless the absolute path in filesystem and web URL
63+
is the same. See also 'objects/info/http-alternates'.
64+
65+
objects/info/http-alternates::
66+
This file records URLs to alternate object stores that
67+
this object store borrows objects from, to be used when
68+
the repository is fetched over HTTP.
5869

5970
refs::
6071
References are stored in subdirectories of this

0 commit comments

Comments
 (0)