Blob


1 .\"
2 .\" Copyright (c) 2020 Stefan Sperling <stsp@openbsd.org>
3 .\"
4 .\" Permission to use, copy, modify, and distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
7 .\"
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 .\"
16 .Dd $Mdocdate$
17 .Dt GOT.CONF 5
18 .Os
19 .Sh NAME
20 .Nm got.conf
21 .Nd Game of Trees configuration file
22 .Sh DESCRIPTION
23 .Nm
24 is the run-time configuration file for
25 .Xr got 1 .
26 .Pp
27 The file format is line-based, with one configuration directive per line.
28 Any lines beginning with a
29 .Sq #
30 are treated as comments and ignored.
31 .Pp
32 The available configuration directives are as follows:
33 .Bl -tag -width Ds
34 .It Ic author Dq Real Name <email address>
35 Configure the author's name and email address for
36 .Cm got commit
37 and
38 .Cm got import
39 when operating on this repository.
40 Author information specified here overrides the
41 .Ev GOT_AUTHOR
42 environment variable.
43 .Pp
44 Because
45 .Xr git 1
46 may fail to parse commits without an email address in author data,
47 .Xr got 1
48 attempts to reject author information with a missing email address.
49 .It Ic remote Ar name Brq ...
50 Define a remote repository.
51 The specified
52 .Ar name
53 can be used to refer to the remote repository on the command line of
54 .Cm got fetch .
55 .Pp
56 Information about this repository is declared in a block of options
57 enclosed in curly brackets:
58 .Bl -tag -width Ds
59 .It Ic server Ar hostname
60 Defines the hostname to use for contacting the remote repository's server.
61 .It Ic repository Ar path
62 Defines the path to the repository on the remote repository's server.
63 .It Ic protocol Ar scheme
64 Defines the protocol to use for communicating with the remote repository's
65 server.
66 .Pp
67 The following protocol schemes are supported:
68 .Bl -tag -width git+ssh
69 .It git
70 The Git protocol as implemented by the
71 .Xr git-daemon 1
72 server.
73 Use of this protocol is discouraged since it supports neither authentication
74 nor encryption.
75 .It git+ssh
76 The Git protocol wrapped in an authenticated and encrypted
77 .Xr ssh 1
78 tunnel.
79 With this protocol the hostname may contain an embedded username for
80 .Xr ssh 1
81 to use:
82 .Mt user@hostname
83 .It ssh
84 Short alias for git+ssh.
85 .El
86 .It Ic port Ar port
87 Defines the port to use for connecting to the remote repository's server.
88 The
89 .Ar port
90 can be specified by number or name.
91 The port name to number mappings are found in the file
92 .Pa /etc/services ;
93 see
94 .Xr services 5
95 for details.
96 If not specified, the default port of the specified
97 .Cm protocol
98 will be used.
99 .It Ic mirror-references Ar yes | no
100 This option controls the behaviour of
101 .Cm got fetch
102 when updating references.
103 .Sy Enabling this option can lead to the loss of local commits.
104 Maintaining custom changes in a mirror repository is therefore discouraged.
105 .Pp
106 If this option is not specified or set to
107 .Ar no ,
108 .Cm got fetch
109 will map references of the remote repository into the local repository's
110 .Dq refs/remotes/
111 namespace.
112 .Pp
113 If this option is set to
114 .Ar yes ,
115 all branches in the
116 .Dq refs/heads/
117 namespace will be updated directly to match the corresponding branches in
118 the remote repository.
119 .El
120 .Sh EXAMPLES
121 Configure author information:
122 .Bd -literal -offset indent
123 author "Flan Hacker <flan_hacker@openbsd.org>"
124 .Ed
125 .Pp
126 Remote repository specification for the Game of Trees repository:
127 .Bd -literal -offset indent
128 remote "origin" {
129 server git.gameoftrees.org
130 protocol git
131 repository got
133 .Ed
134 .Pp
135 Mirror the OpenBSD src repository from Github:
136 .Bd -literal -offset indent
137 remote "origin" {
138 repository "openbsd/src"
139 server git@github.com
140 protocol git+ssh
141 mirror-references yes
143 .Ed
144 .Sh FILES
145 .Bl -tag -width Ds -compact
146 .It Pa got.conf
147 If present, the
148 .Nm
149 configuration file is located in the root directory of a Git repository
150 and supersedes any relevant settings in Git's
151 .Pa config
152 file.
153 .El
154 .Sh SEE ALSO
155 .Xr got 1 ,
156 .Xr git-repository 5