Blame


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