Blob


1 <!DOCTYPE html>
2 <html>
3 <!-- This is an automatically generated file. Do not edit.
4 Copyright (c) 2018 Stefan Sperling
6 Permission to use, copy, modify, and distribute this software for any
7 purpose with or without fee is hereby granted, provided that the above
8 copyright notice and this permission notice appear in all copies.
10 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 -->
18 <head>
19 <meta charset="utf-8"/>
20 <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
21 <link rel="stylesheet" href="mandoc.css" type="text/css" media="all"/>
22 <title>TOG(1)</title>
23 </head>
24 <body>
25 <table class="head">
26 <tr>
27 <td class="head-ltitle">TOG(1)</td>
28 <td class="head-vol">General Commands Manual</td>
29 <td class="head-rtitle">TOG(1)</td>
30 </tr>
31 </table>
32 <div class="manual-text">
33 <section class="Sh">
34 <h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
35 <p class="Pp"><code class="Nm">tog</code> &#x2014; <span class="Nd">Git
36 repository browser</span></p>
37 </section>
38 <section class="Sh">
39 <h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
40 <table class="Nm">
41 <tr>
42 <td><code class="Nm">tog</code></td>
43 <td>[<var class="Ar">command</var>] [<code class="Fl">-h</code>]
44 [<var class="Ar">arg ...</var>]</td>
45 </tr>
46 </table>
47 <p class="Pp"></p>
48 <br/>
49 <table class="Nm">
50 <tr>
51 <td><code class="Nm">tog</code></td>
52 <td><var class="Ar">path</var></td>
53 </tr>
54 </table>
55 </section>
56 <section class="Sh">
57 <h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
58 <p class="Pp"><code class="Nm">tog</code> is an interactive read-only browser
59 for Git repositories. This repository format is described in
60 <a class="Xr">git-repository(5)</a>.</p>
61 <p class="Pp"><code class="Nm">tog</code> supports several types of views which
62 display repository data:</p>
63 <dl class="Bl-tag">
64 <dt>Log view</dt>
65 <dd>Displays commits in the repository's history. This view is displayed
66 initially if no <var class="Ar">command</var> is specified, or if just a
67 <var class="Ar">path</var> is specified.</dd>
68 <dt>Diff view</dt>
69 <dd>Displays changes made in a particular commit.</dd>
70 <dt>Blame view</dt>
71 <dd>Displays the line-by-line history of a file.</dd>
72 <dt>Tree view</dt>
73 <dd>Displays the tree corresponding to a particular commit.</dd>
74 <dt>Ref view</dt>
75 <dd>Displays references in the repository.</dd>
76 </dl>
77 <p class="Pp"><code class="Nm">tog</code> provides global and command-specific
78 key bindings and options. The global key bindings are:</p>
79 <dl class="Bl-tag">
80 <dt id="Q"><a class="permalink" href="#Q"><code class="Cm">Q</code></a></dt>
81 <dd>Quit <code class="Nm">tog</code>.</dd>
82 <dt id="q"><a class="permalink" href="#q"><code class="Cm">q</code></a></dt>
83 <dd>Quit the view which is in focus.</dd>
84 <dt id="Tab"><a class="permalink" href="#Tab"><code class="Cm">Tab</code></a></dt>
85 <dd>Switch focus between views.</dd>
86 <dt id="f"><a class="permalink" href="#f"><code class="Cm">f</code></a></dt>
87 <dd>Toggle fullscreen mode for a split-screen view.
88 <code class="Nm">tog</code> will automatically use split-screen views if
89 the size of the terminal window is sufficiently large.</dd>
90 </dl>
91 <p class="Pp">Global options must precede the command name, and are as
92 follows:</p>
93 <dl class="Bl-tag">
94 <dt id="h"><a class="permalink" href="#h"><code class="Fl">-h</code></a></dt>
95 <dd>Display usage information.</dd>
96 <dt id="V"><a class="permalink" href="#V"><code class="Fl">-V</code></a>,
97 <code class="Fl">--version</code></dt>
98 <dd>Display program version and exit immediately.</dd>
99 </dl>
100 <p class="Pp">The commands for <code class="Nm">tog</code> are as follows:</p>
101 <dl class="Bl-tag">
102 <dt id="log"><a class="permalink" href="#log"><code class="Cm">log</code></a>
103 [<code class="Fl">-b</code>] [<code class="Fl">-c</code>
104 <var class="Ar">commit</var>] [<code class="Fl">-r</code>
105 <var class="Ar">repository-path</var>] [<var class="Ar">path</var>]</dt>
106 <dd>Display history of a repository. If a <var class="Ar">path</var> is
107 specified, show only commits which modified this path. If invoked in a
108 work tree, the <var class="Ar">path</var> is interpreted relative to the
109 current working directory, and the work tree's path prefix is implicitly
110 prepended. Otherwise, the path is interpreted relative to the repository
111 root.
112 <p class="Pp">This command is also executed if no explicit command is
113 specified.</p>
114 <p class="Pp">The key bindings for <code class="Cm">tog log</code> are as
115 follows:</p>
116 <dl class="Bl-tag">
117 <dt id="Down-arrow,"><a class="permalink" href="#Down-arrow,"><code class="Cm">Down-arrow,
118 j, &gt;, Full stop, Ctrl-n</code></a></dt>
119 <dd>Move the selection cursor down.</dd>
120 <dt id="Up-arrow,"><a class="permalink" href="#Up-arrow,"><code class="Cm">Up-arrow,
121 k, &lt;, Comma, Ctrl-p</code></a></dt>
122 <dd>Move the selection cursor up.</dd>
123 <dt id="Page-down,"><a class="permalink" href="#Page-down,"><code class="Cm">Page-down,
124 Ctrl+f</code></a></dt>
125 <dd>Move the selection cursor down one page.</dd>
126 <dt id="Page-up,"><a class="permalink" href="#Page-up,"><code class="Cm">Page-up,
127 Ctrl+b</code></a></dt>
128 <dd>Move the selection cursor up one page.</dd>
129 <dt id="Home,"><a class="permalink" href="#Home,"><code class="Cm">Home,
130 g</code></a></dt>
131 <dd>Move the cursor to the newest commit.</dd>
132 <dt id="End,"><a class="permalink" href="#End,"><code class="Cm">End,
133 G</code></a></dt>
134 <dd>Move the cursor to the oldest commit. This will traverse all commits
135 on the current branch which may take a long time depending on the
136 number of commits in branch history. If needed, this operation can be
137 cancelled with <code class="Cm">Backspace</code>.</dd>
138 <dt id="Enter,"><a class="permalink" href="#Enter,"><code class="Cm">Enter,
139 Space</code></a></dt>
140 <dd>Open a <code class="Cm">diff</code> view showing file changes made in
141 the currently selected commit.</dd>
142 <dt id="t"><a class="permalink" href="#t"><code class="Cm">t</code></a></dt>
143 <dd>Open a <code class="Cm">tree</code> view showing the tree for the
144 currently selected commit.</dd>
145 <dt id="Backspace"><a class="permalink" href="#Backspace"><code class="Cm">Backspace</code></a></dt>
146 <dd>Show log entries for the parent directory of the currently selected
147 path. However when an active search is in progress or when additional
148 commits are loaded, <code class="Cm">Backspace</code> aborts the
149 running operation.</dd>
150 <dt id="/"><a class="permalink" href="#/"><code class="Cm">/</code></a></dt>
151 <dd>Prompt for a search pattern and start searching for matching commits.
152 The search pattern is an extended regular expression which is matched
153 against a commit's author name, committer name, log message, and
154 commit ID SHA1 hash. Regular expression syntax is documented in
155 <a class="Xr">re_format(7)</a>.</dd>
156 <dt id="n"><a class="permalink" href="#n"><code class="Cm">n</code></a></dt>
157 <dd>Find the next commit which matches the current search pattern.
158 Searching continues until either a match is found or the
159 <code class="Cm">Backspace</code> key is pressed.</dd>
160 <dt id="N"><a class="permalink" href="#N"><code class="Cm">N</code></a></dt>
161 <dd>Find the previous commit which matches the current search pattern.
162 Searching continues until either a match is found or the
163 <code class="Cm">Backspace</code> key is pressed.</dd>
164 <dt id="Ctrl+l"><a class="permalink" href="#Ctrl+l"><code class="Cm">Ctrl+l</code></a></dt>
165 <dd>Reload the <code class="Cm">log</code> view with new commits found in
166 the repository.</dd>
167 <dt id="B"><a class="permalink" href="#B"><code class="Cm">B</code></a></dt>
168 <dd>Reload the <code class="Cm">log</code> view and toggle display of
169 merged commits. The <code class="Fl">-b</code> option determines
170 whether merged commits are displayed initially.</dd>
171 <dt id="r"><a class="permalink" href="#r"><code class="Cm">r</code></a></dt>
172 <dd>Open a <code class="Cm">ref</code> view listing all references in the
173 repository. This can then be used to open a new
174 <code class="Cm">log</code> view for arbitrary branches and tags.</dd>
175 </dl>
176 <p class="Pp">The options for <code class="Cm">tog log</code> are as
177 follows:</p>
178 <dl class="Bl-tag">
179 <dt id="b"><a class="permalink" href="#b"><code class="Fl">-b</code></a></dt>
180 <dd>Display individual commits which were merged into the current branch
181 from other branches. By default, <code class="Cm">tog log</code> shows
182 the linear history of the current branch only. The
183 <code class="Cm">B</code> key binding can be used to toggle display of
184 merged commits at run-time.</dd>
185 <dt id="c"><a class="permalink" href="#c"><code class="Fl">-c</code></a>
186 <var class="Ar">commit</var></dt>
187 <dd>Start traversing history at the specified
188 <var class="Ar">commit</var>. The expected argument is the name of a
189 branch or a commit ID SHA1 hash. An abbreviated hash argument will be
190 expanded to a full SHA1 hash automatically, provided the abbreviation
191 is unique. If this option is not specified, default to the work tree's
192 current branch if invoked in a work tree, or to the repository's HEAD
193 reference.</dd>
194 <dt id="r~2"><a class="permalink" href="#r~2"><code class="Fl">-r</code></a>
195 <var class="Ar">repository-path</var></dt>
196 <dd>Use the repository at the specified path. If not specified, assume the
197 repository is located at or above the current working directory. If
198 this directory is a <a class="Xr">got(1)</a> work tree, use the
199 repository path associated with this work tree.</dd>
200 </dl>
201 </dd>
202 <dt id="diff"><a class="permalink" href="#diff"><code class="Cm">diff</code></a>
203 [<code class="Fl">-a</code>] [<code class="Fl">-C</code>
204 <var class="Ar">number</var>] [<code class="Fl">-r</code>
205 <var class="Ar">repository-path</var>] [<code class="Fl">-w</code>]
206 <var class="Ar">object1</var> <var class="Ar">object2</var></dt>
207 <dd>Display the differences between two objects in the repository. Treat each
208 of the two arguments as a reference, a tag name, or an object ID SHA1
209 hash, and display differences between the corresponding objects. Both
210 objects must be of the same type (blobs, trees, or commits). An
211 abbreviated hash argument will be expanded to a full SHA1 hash
212 automatically, provided the abbreviation is unique.
213 <p class="Pp">The key bindings for <code class="Cm">tog diff</code> are as
214 follows:</p>
215 <dl class="Bl-tag">
216 <dt id="a"><a class="permalink" href="#a"><code class="Cm">a</code></a></dt>
217 <dd>Toggle treatment of file contents as ASCII text even if binary data
218 was detected.</dd>
219 <dt id="Down-arrow,~2"><a class="permalink" href="#Down-arrow,~2"><code class="Cm">Down-arrow,
220 j, Ctrl-n</code></a></dt>
221 <dd>Scroll down.</dd>
222 <dt id="Up-arrow,~2"><a class="permalink" href="#Up-arrow,~2"><code class="Cm">Up-arrow,
223 k, Ctrl-p</code></a></dt>
224 <dd>Scroll up.</dd>
225 <dt id="Page-down,~2"><a class="permalink" href="#Page-down,~2"><code class="Cm">Page-down,
226 Space, Ctrl+f</code></a></dt>
227 <dd>Scroll down one page.</dd>
228 <dt id="Page-up,~2"><a class="permalink" href="#Page-up,~2"><code class="Cm">Page-up,
229 Ctrl+b</code></a></dt>
230 <dd>Scroll up one page.</dd>
231 <dt id="Home,~2"><a class="permalink" href="#Home,~2"><code class="Cm">Home,
232 g</code></a></dt>
233 <dd>Scroll to the top of the view.</dd>
234 <dt id="End,~2"><a class="permalink" href="#End,~2"><code class="Cm">End,
235 G</code></a></dt>
236 <dd>Scroll to the bottom of the view.</dd>
237 <dt id="_"><a class="permalink" href="#_"><code class="Cm">[</code></a></dt>
238 <dd>Reduce the amount of diff context lines.</dd>
239 <dt id="_~2"><a class="permalink" href="#_~2"><code class="Cm">]</code></a></dt>
240 <dd>Increase the amount of diff context lines.</dd>
241 <dt id="_,"><a class="permalink" href="#_,"><code class="Cm">&lt;,
242 Comma</code></a></dt>
243 <dd>If the <code class="Cm">diff</code> view was opened via the
244 <code class="Cm">log</code> view, move to the previous (younger)
245 commit.</dd>
246 <dt id="_,~2"><a class="permalink" href="#_,~2"><code class="Cm">&gt;,
247 Full stop</code></a></dt>
248 <dd>If the <code class="Cm">diff</code> view was opened via the
249 <code class="Cm">log</code> view, move to the next (older)
250 commit.</dd>
251 <dt id="/~2"><a class="permalink" href="#/~2"><code class="Cm">/</code></a></dt>
252 <dd>Prompt for a search pattern and start searching for matching lines.
253 The search pattern is an extended regular expression. Regular
254 expression syntax is documented in
255 <a class="Xr">re_format(7)</a>.</dd>
256 <dt id="n~2"><a class="permalink" href="#n~2"><code class="Cm">n</code></a></dt>
257 <dd>Find the next line which matches the current search pattern.</dd>
258 <dt id="N~2"><a class="permalink" href="#N~2"><code class="Cm">N</code></a></dt>
259 <dd>Find the previous line which matches the current search pattern.</dd>
260 <dt id="w"><a class="permalink" href="#w"><code class="Cm">w</code></a></dt>
261 <dd>Toggle display of whitespace-only changes.</dd>
262 </dl>
263 <p class="Pp">The options for <code class="Cm">tog diff</code> are as
264 follows:</p>
265 <dl class="Bl-tag">
266 <dt id="a~2"><a class="permalink" href="#a~2"><code class="Fl">-a</code></a></dt>
267 <dd>Treat file contents as ASCII text even if binary data is
268 detected.</dd>
269 <dt id="C"><a class="permalink" href="#C"><code class="Fl">-C</code></a>
270 <var class="Ar">number</var></dt>
271 <dd>Set the number of context lines shown in the diff. By default, 3 lines
272 of context are shown.</dd>
273 <dt id="r~3"><a class="permalink" href="#r~3"><code class="Fl">-r</code></a>
274 <var class="Ar">repository-path</var></dt>
275 <dd>Use the repository at the specified path. If not specified, assume the
276 repository is located at or above the current working directory. If
277 this directory is a <a class="Xr">got(1)</a> work tree, use the
278 repository path associated with this work tree.</dd>
279 <dt id="w~2"><a class="permalink" href="#w~2"><code class="Fl">-w</code></a></dt>
280 <dd>Ignore whitespace-only changes.</dd>
281 </dl>
282 </dd>
283 <dt id="blame"><a class="permalink" href="#blame"><code class="Cm">blame</code></a>
284 [<code class="Fl">-c</code> <var class="Ar">commit</var>]
285 [<code class="Fl">-r</code> <var class="Ar">repository-path</var>]
286 <var class="Ar">path</var></dt>
287 <dd>Display line-by-line history of a file at the specified path.
288 <p class="Pp">The key bindings for <code class="Cm">tog blame</code> are as
289 follows:</p>
290 <dl class="Bl-tag">
291 <dt id="Down-arrow,~3"><a class="permalink" href="#Down-arrow,~3"><code class="Cm">Down-arrow,
292 j, Ctrl-n</code></a></dt>
293 <dd>Move the selection cursor down.</dd>
294 <dt id="Up-arrow,~3"><a class="permalink" href="#Up-arrow,~3"><code class="Cm">Up-arrow,
295 k, Ctrl-p</code></a></dt>
296 <dd>Move the selection cursor up.</dd>
297 <dt id="Page-down,~3"><a class="permalink" href="#Page-down,~3"><code class="Cm">Page-down,
298 Space, Ctrl+f</code></a></dt>
299 <dd>Move the selection cursor down one page.</dd>
300 <dt id="Page-up,~3"><a class="permalink" href="#Page-up,~3"><code class="Cm">Page-up,
301 Ctrl+b</code></a></dt>
302 <dd>Move the selection cursor up one page.</dd>
303 <dt id="Home,~3"><a class="permalink" href="#Home,~3"><code class="Cm">Home,
304 g</code></a></dt>
305 <dd>Move the selection cursor to the first line of the file.</dd>
306 <dt id="End,~3"><a class="permalink" href="#End,~3"><code class="Cm">End,
307 G</code></a></dt>
308 <dd>Move the selection cursor to the last line of the file.</dd>
309 <dt id="Enter"><a class="permalink" href="#Enter"><code class="Cm">Enter</code></a></dt>
310 <dd>Open a <code class="Cm">diff</code> view for the currently selected
311 line's commit.</dd>
312 <dt id="b~2"><a class="permalink" href="#b~2"><code class="Cm">b</code></a></dt>
313 <dd>Reload the <code class="Cm">blame</code> view with the version of the
314 file as found in the currently selected line's commit.</dd>
315 <dt id="p"><a class="permalink" href="#p"><code class="Cm">p</code></a></dt>
316 <dd>Reload the <code class="Cm">blame</code> view with the version of the
317 file as found in the parent commit of the currently selected line's
318 commit.</dd>
319 <dt id="B~2"><a class="permalink" href="#B~2"><code class="Cm">B</code></a></dt>
320 <dd>Reload the <code class="Cm">blame</code> view with the previously
321 blamed commit.</dd>
322 <dt id="/~3"><a class="permalink" href="#/~3"><code class="Cm">/</code></a></dt>
323 <dd>Prompt for a search pattern and start searching for matching lines.
324 The search pattern is an extended regular expression. Regular
325 expression syntax is documented in
326 <a class="Xr">re_format(7)</a>.</dd>
327 <dt id="n~3"><a class="permalink" href="#n~3"><code class="Cm">n</code></a></dt>
328 <dd>Find the next line which matches the current search pattern.</dd>
329 <dt id="N~3"><a class="permalink" href="#N~3"><code class="Cm">N</code></a></dt>
330 <dd>Find the previous line which matches the current search pattern.</dd>
331 </dl>
332 <p class="Pp">The options for <code class="Cm">tog blame</code> are as
333 follows:</p>
334 <dl class="Bl-tag">
335 <dt id="c~2"><a class="permalink" href="#c~2"><code class="Fl">-c</code></a>
336 <var class="Ar">commit</var></dt>
337 <dd>Start traversing history at the specified
338 <var class="Ar">commit</var>. The expected argument is the name of a
339 branch or a commit ID SHA1 hash. An abbreviated hash argument will be
340 expanded to a full SHA1 hash automatically, provided the abbreviation
341 is unique.</dd>
342 <dt id="r~4"><a class="permalink" href="#r~4"><code class="Fl">-r</code></a>
343 <var class="Ar">repository-path</var></dt>
344 <dd>Use the repository at the specified path. If not specified, assume the
345 repository is located at or above the current working directory. If
346 this directory is a <a class="Xr">got(1)</a> work tree, use the
347 repository path associated with this work tree.</dd>
348 </dl>
349 </dd>
350 <dt id="tree"><a class="permalink" href="#tree"><code class="Cm">tree</code></a>
351 [<code class="Fl">-c</code> <var class="Ar">commit</var>]
352 [<code class="Fl">-r</code> <var class="Ar">repository-path</var>]
353 [<var class="Ar">path</var>]</dt>
354 <dd>Display the repository tree. If a <var class="Ar">path</var> is specified,
355 show tree entries at this path.
356 <p class="Pp">Displayed tree entries may carry one of the following trailing
357 annotations:</p>
358 <table class="Bl-column">
359 <tr>
360 <td>@</td>
361 <td>entry is a symbolic link</td>
362 </tr>
363 <tr>
364 <td>/</td>
365 <td>entry is a directory</td>
366 </tr>
367 <tr>
368 <td>*</td>
369 <td>entry is an executable file</td>
370 </tr>
371 <tr>
372 <td>$</td>
373 <td>entry is a Git submodule</td>
374 </tr>
375 </table>
376 <p class="Pp">Symbolic link entries are also annotated with the target path
377 of the link.</p>
378 <p class="Pp">The key bindings for <code class="Cm">tog tree</code> are as
379 follows:</p>
380 <dl class="Bl-tag">
381 <dt id="Down-arrow,~4"><a class="permalink" href="#Down-arrow,~4"><code class="Cm">Down-arrow,
382 j, Ctrl-n</code></a></dt>
383 <dd>Move the selection cursor down.</dd>
384 <dt id="Up-arrow,~4"><a class="permalink" href="#Up-arrow,~4"><code class="Cm">Up-arrow,
385 k, Ctrl-p</code></a></dt>
386 <dd>Move the selection cursor up.</dd>
387 <dt id="Page-down,~4"><a class="permalink" href="#Page-down,~4"><code class="Cm">Page-down,
388 Ctrl+f</code></a></dt>
389 <dd>Move the selection cursor down one page.</dd>
390 <dt id="Page-up,~4"><a class="permalink" href="#Page-up,~4"><code class="Cm">Page-up,
391 Ctrl+b</code></a></dt>
392 <dd>Move the selection cursor up one page.</dd>
393 <dt id="Home,~4"><a class="permalink" href="#Home,~4"><code class="Cm">Home,
394 g</code></a></dt>
395 <dd>Move the selection cursor to the first entry.</dd>
396 <dt id="End,~4"><a class="permalink" href="#End,~4"><code class="Cm">End,
397 G</code></a></dt>
398 <dd>Move the selection cursor to the last entry.</dd>
399 <dt id="Enter~2"><a class="permalink" href="#Enter~2"><code class="Cm">Enter</code></a></dt>
400 <dd>Enter the currently selected directory, or switch to the
401 <code class="Cm">blame</code> view for the currently selected
402 file.</dd>
403 <dt id="l"><a class="permalink" href="#l"><code class="Cm">l</code></a></dt>
404 <dd>Open a <code class="Cm">log</code> view for the currently selected
405 tree entry.</dd>
406 <dt id="r~5"><a class="permalink" href="#r~5"><code class="Cm">r</code></a></dt>
407 <dd>Open a <code class="Cm">ref</code> view listing all references in the
408 repository. This can then be used to open a new
409 <code class="Cm">tree</code> view for arbitrary branches and
410 tags.</dd>
411 <dt id="Backspace~2"><a class="permalink" href="#Backspace~2"><code class="Cm">Backspace</code></a></dt>
412 <dd>Move back to the parent directory.</dd>
413 <dt id="i"><a class="permalink" href="#i"><code class="Cm">i</code></a></dt>
414 <dd>Show object IDs for all objects displayed in the
415 <code class="Cm">tree</code> view.</dd>
416 <dt id="/~4"><a class="permalink" href="#/~4"><code class="Cm">/</code></a></dt>
417 <dd>Prompt for a search pattern and start searching for matching tree
418 entries. The search pattern is an extended regular expression which is
419 matched against the tree entry's name. Regular expression syntax is
420 documented in <a class="Xr">re_format(7)</a>.</dd>
421 <dt id="n~4"><a class="permalink" href="#n~4"><code class="Cm">n</code></a></dt>
422 <dd>Find the next tree entry which matches the current search
423 pattern.</dd>
424 <dt id="N~4"><a class="permalink" href="#N~4"><code class="Cm">N</code></a></dt>
425 <dd>Find the previous tree entry which matches the current search
426 pattern.</dd>
427 </dl>
428 <p class="Pp">The options for <code class="Cm">tog tree</code> are as
429 follows:</p>
430 <dl class="Bl-tag">
431 <dt id="c~3"><a class="permalink" href="#c~3"><code class="Fl">-c</code></a>
432 <var class="Ar">commit</var></dt>
433 <dd>Start traversing history at the specified
434 <var class="Ar">commit</var>. The expected argument is the name of a
435 branch or a commit ID SHA1 hash. An abbreviated hash argument will be
436 expanded to a full SHA1 hash automatically, provided the abbreviation
437 is unique.</dd>
438 <dt id="r~6"><a class="permalink" href="#r~6"><code class="Fl">-r</code></a>
439 <var class="Ar">repository-path</var></dt>
440 <dd>Use the repository at the specified path. If not specified, assume the
441 repository is located at or above the current working directory. If
442 this directory is a <a class="Xr">got(1)</a> work tree, use the
443 repository path associated with this work tree.</dd>
444 </dl>
445 </dd>
446 <dt id="ref"><a class="permalink" href="#ref"><code class="Cm">ref</code></a>
447 [<code class="Fl">-r</code> <var class="Ar">repository-path</var>]</dt>
448 <dd>Display references in the repository.
449 <p class="Pp">The key bindings for <code class="Cm">tog ref</code> are as
450 follows:</p>
451 <dl class="Bl-tag">
452 <dt id="Down-arrow,~5"><a class="permalink" href="#Down-arrow,~5"><code class="Cm">Down-arrow,
453 j, Ctrl-n</code></a></dt>
454 <dd>Move the selection cursor down.</dd>
455 <dt id="Up-arrow,~5"><a class="permalink" href="#Up-arrow,~5"><code class="Cm">Up-arrow,
456 k, Ctrl-p</code></a></dt>
457 <dd>Move the selection cursor up.</dd>
458 <dt id="Page-down,~5"><a class="permalink" href="#Page-down,~5"><code class="Cm">Page-down,
459 Ctrl+f</code></a></dt>
460 <dd>Move the selection cursor down one page.</dd>
461 <dt id="Page-up,~5"><a class="permalink" href="#Page-up,~5"><code class="Cm">Page-up,
462 Ctrl+b</code></a></dt>
463 <dd>Move the selection cursor up one page.</dd>
464 <dt id="Home,~5"><a class="permalink" href="#Home,~5"><code class="Cm">Home,
465 g</code></a></dt>
466 <dd>Move the selection cursor to the first reference.</dd>
467 <dt id="End,~5"><a class="permalink" href="#End,~5"><code class="Cm">End,
468 G</code></a></dt>
469 <dd>Move the selection cursor to the last reference.</dd>
470 <dt id="Enter~3"><a class="permalink" href="#Enter~3"><code class="Cm">Enter</code></a></dt>
471 <dd>Open a <code class="Cm">log</code> view which begins traversing
472 history at the commit resolved via the currently selected
473 reference.</dd>
474 <dt id="t~2"><a class="permalink" href="#t~2"><code class="Cm">t</code></a></dt>
475 <dd>Open a <code class="Cm">tree</code> view showing the tree resolved via
476 the currently selected reference.</dd>
477 <dt id="i~2"><a class="permalink" href="#i~2"><code class="Cm">i</code></a></dt>
478 <dd>Show object IDs for all non-symbolic references displayed in the
479 <code class="Cm">ref</code> view.</dd>
480 <dt id="o"><a class="permalink" href="#o"><code class="Cm">o</code></a></dt>
481 <dd>Toggle display order of references between sort by name and sort by
482 timestamp.</dd>
483 <dt id="/~5"><a class="permalink" href="#/~5"><code class="Cm">/</code></a></dt>
484 <dd>Prompt for a search pattern and start searching for matching
485 references. The search pattern is an extended regular expression which
486 is matched against absolute reference names. Regular expression syntax
487 is documented in <a class="Xr">re_format(7)</a>.</dd>
488 <dt id="n~5"><a class="permalink" href="#n~5"><code class="Cm">n</code></a></dt>
489 <dd>Find the next reference which matches the current search pattern.</dd>
490 <dt id="N~5"><a class="permalink" href="#N~5"><code class="Cm">N</code></a></dt>
491 <dd>Find the previous reference which matches the current search
492 pattern.</dd>
493 <dt id="Ctrl+l~2"><a class="permalink" href="#Ctrl+l~2"><code class="Cm">Ctrl+l</code></a></dt>
494 <dd>Reload the list of references displayed by the
495 <code class="Cm">ref</code> view.</dd>
496 </dl>
497 <p class="Pp">The options for <code class="Cm">tog ref</code> are as
498 follows:</p>
499 <dl class="Bl-tag">
500 <dt id="r~7"><a class="permalink" href="#r~7"><code class="Fl">-r</code></a>
501 <var class="Ar">repository-path</var></dt>
502 <dd>Use the repository at the specified path. If not specified, assume the
503 repository is located at or above the current working directory. If
504 this directory is a <a class="Xr">got(1)</a> work tree, use the
505 repository path associated with this work tree.</dd>
506 </dl>
507 </dd>
508 </dl>
509 </section>
510 <section class="Sh">
511 <h1 class="Sh" id="ENVIRONMENT"><a class="permalink" href="#ENVIRONMENT">ENVIRONMENT</a></h1>
512 <dl class="Bl-tag">
513 <dt id="TOG_COLORS"><a class="permalink" href="#TOG_COLORS"><code class="Ev">TOG_COLORS</code></a></dt>
514 <dd><code class="Nm">tog</code> shows colorized output if this variable is set
515 to a non-empty value. The default color scheme can be modified by setting
516 the environment variables documented below. The colors available in color
517 schemes are &#x201C;black&#x201D;, &#x201C;red&#x201D;,
518 &#x201C;green&#x201D;, &#x201C;yellow&#x201D;, &#x201C;blue&#x201D;,
519 &#x201C;magenta&#x201D;, &#x201C;cyan&#x201D;, and &#x201C;default&#x201D;
520 which maps to the terminal's default foreground color.</dd>
521 <dt id="TOG_COLOR_DIFF_MINUS"><a class="permalink" href="#TOG_COLOR_DIFF_MINUS"><code class="Ev">TOG_COLOR_DIFF_MINUS</code></a></dt>
522 <dd>The color used to mark up removed lines in diffs. If not set, the default
523 value &#x201C;magenta&#x201D; is used.</dd>
524 <dt id="TOG_COLOR_DIFF_PLUS"><a class="permalink" href="#TOG_COLOR_DIFF_PLUS"><code class="Ev">TOG_COLOR_DIFF_PLUS</code></a></dt>
525 <dd>The color used to mark up added lines in diffs. If not set, the default
526 value &#x201C;cyan&#x201D; is used.</dd>
527 <dt id="TOG_COLOR_DIFF_CHUNK_HEADER"><a class="permalink" href="#TOG_COLOR_DIFF_CHUNK_HEADER"><code class="Ev">TOG_COLOR_DIFF_CHUNK_HEADER</code></a></dt>
528 <dd>The color used to mark up chunk header lines in diffs. If not set, the
529 default value &#x201C;yellow&#x201D; is used.</dd>
530 <dt id="TOG_COLOR_DIFF_META"><a class="permalink" href="#TOG_COLOR_DIFF_META"><code class="Ev">TOG_COLOR_DIFF_META</code></a></dt>
531 <dd>The color used to mark up meta data in diffs. If not set, the default
532 value &#x201C;green&#x201D; is used.</dd>
533 <dt id="TOG_COLOR_TREE_SUBMODULE"><a class="permalink" href="#TOG_COLOR_TREE_SUBMODULE"><code class="Ev">TOG_COLOR_TREE_SUBMODULE</code></a></dt>
534 <dd>The color used to mark up submodule tree entries. If not set, the default
535 value &#x201C;magenta&#x201D; is used.</dd>
536 <dt id="TOG_COLOR_TREE_SYMLINK"><a class="permalink" href="#TOG_COLOR_TREE_SYMLINK"><code class="Ev">TOG_COLOR_TREE_SYMLINK</code></a></dt>
537 <dd>The color used to mark up symbolic link tree entries. If not set, the
538 default value &#x201C;magenta&#x201D; is used.</dd>
539 <dt id="TOG_COLOR_TREE_DIRECTORY"><a class="permalink" href="#TOG_COLOR_TREE_DIRECTORY"><code class="Ev">TOG_COLOR_TREE_DIRECTORY</code></a></dt>
540 <dd>The color used to mark up directory tree entries. If not set, the default
541 value &#x201C;cyan&#x201D; is used.</dd>
542 <dt id="TOG_COLOR_TREE_EXECUTABLE"><a class="permalink" href="#TOG_COLOR_TREE_EXECUTABLE"><code class="Ev">TOG_COLOR_TREE_EXECUTABLE</code></a></dt>
543 <dd>The color used to mark up executable file tree entries. If not set, the
544 default value &#x201C;green&#x201D; is used.</dd>
545 <dt id="TOG_COLOR_COMMIT"><a class="permalink" href="#TOG_COLOR_COMMIT"><code class="Ev">TOG_COLOR_COMMIT</code></a></dt>
546 <dd>The color used to mark up commit IDs. If not set, the default value
547 &#x201C;green&#x201D; is used.</dd>
548 <dt id="TOG_COLOR_AUTHOR"><a class="permalink" href="#TOG_COLOR_AUTHOR"><code class="Ev">TOG_COLOR_AUTHOR</code></a></dt>
549 <dd>The color used to mark up author information. If not set, the default
550 value &#x201C;cyan&#x201D; is used.</dd>
551 <dt id="TOG_COLOR_DATE"><a class="permalink" href="#TOG_COLOR_DATE"><code class="Ev">TOG_COLOR_DATE</code></a></dt>
552 <dd>The color used to mark up date information. If not set, the default value
553 &#x201C;yellow&#x201D; is used.</dd>
554 <dt id="TOG_COLOR_REFS_HEADS"><a class="permalink" href="#TOG_COLOR_REFS_HEADS"><code class="Ev">TOG_COLOR_REFS_HEADS</code></a></dt>
555 <dd>The color used to mark up references in the &#x201C;refs/heads/&#x201D;
556 namespace. If not set, the default value &#x201C;green&#x201D; is
557 used.</dd>
558 <dt id="TOG_COLOR_REFS_TAGS"><a class="permalink" href="#TOG_COLOR_REFS_TAGS"><code class="Ev">TOG_COLOR_REFS_TAGS</code></a></dt>
559 <dd>The color used to mark up references in the &#x201C;refs/tags/&#x201D;
560 namespace. If not set, the default value &#x201C;magenta&#x201D; is
561 used.</dd>
562 <dt id="TOG_COLOR_REFS_REMOTES"><a class="permalink" href="#TOG_COLOR_REFS_REMOTES"><code class="Ev">TOG_COLOR_REFS_REMOTES</code></a></dt>
563 <dd>The color used to mark up references in the &#x201C;refs/remotes/&#x201D;
564 namespace. If not set, the default value &#x201C;yellow&#x201D; is
565 used.</dd>
566 <dt id="TOG_COLOR_REFS_BACKUP"><a class="permalink" href="#TOG_COLOR_REFS_BACKUP"><code class="Ev">TOG_COLOR_REFS_BACKUP</code></a></dt>
567 <dd>The color used to mark up references in the
568 &#x201C;refs/got/backup/&#x201D; namespace. If not set, the default value
569 &#x201C;cyan&#x201D; is used.</dd>
570 </dl>
571 </section>
572 <section class="Sh">
573 <h1 class="Sh" id="EXIT_STATUS"><a class="permalink" href="#EXIT_STATUS">EXIT
574 STATUS</a></h1>
575 <p class="Pp">The <code class="Nm">tog</code> utility exits&#x00A0;0 on success,
576 and&#x00A0;&gt;0 if an error occurs.</p>
577 </section>
578 <section class="Sh">
579 <h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
580 ALSO</a></h1>
581 <p class="Pp"><a class="Xr">got(1)</a>, <a class="Xr">git-repository(5)</a>,
582 <a class="Xr">re_format(7)</a></p>
583 </section>
584 <section class="Sh">
585 <h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
586 <p class="Pp"><span class="An">Stefan Sperling</span>
587 &lt;<a class="Mt" href="mailto:stsp@openbsd.org">stsp@openbsd.org</a>&gt;
588 <br/>
589 <span class="An">Joshua Stein</span>
590 &lt;<a class="Mt" href="mailto:jcs@openbsd.org">jcs@openbsd.org</a>&gt;</p>
591 </section>
592 </div>
593 <table class="foot">
594 <tr>
595 <td class="foot-date">May 10, 2022</td>
596 <td class="foot-os">OpenBSD 7.1</td>
597 </tr>
598 </table>
599 </body>
600 </html>