Blob


1 .\"
2 .\" Copyright (c) 2018 Stefan Sperling
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 TOG 1
18 .Os
19 .Sh NAME
20 .Nm tog
21 .Nd git repository browser
22 .Sh SYNOPSIS
23 .Nm
24 .Ar command
25 .Op Fl h
26 .Op Ar arg ...
27 .Sh DESCRIPTION
28 .Nm
29 is an interactive read-only browser for git repositories.
30 This repository format is described in
31 .Xr got-repository 5 .
32 .Pp
33 .Nm
34 provides global and command-specific options.
35 Global options must preceed the command name, and are as follows:
36 .Bl -tag -width tenletters
37 .It Fl h
38 Display usage information.
39 .El
40 .Pp
41 The commands for
42 .Nm
43 are as follows:
44 .Bl -tag -width blame
45 .It Cm log [ Fl c Ar commit ] [ Fl r Ar repository-path ] [ path ]
46 Display history of a repository.
47 If a
48 .Ar path
49 is specified, show only commits which modified this path.
50 .Pp
51 This command is also executed if no explicit command is specified.
52 .Pp
53 The key bindings for
54 .Cm tog log
55 are as follows:
56 .Bl -tag -width Ds
57 .It Cm Down-arrow, j, Page-down
58 Move the selection cursor down.
59 .It Cm Up-arrow, k, Page-up
60 Move the selection cursor up.
61 .It Cm Enter
62 Switch to the
63 .Cm diff
64 view showing file changes made in the currently selected commit.
65 .It Cm t
66 Switch to the
67 .Cm tree
68 view showing the tree for the currently selected commit.
69 .It Cm q
70 Quit the
71 .Cm log
72 view.
73 .El
74 .Pp
75 The options for
76 .Cm tog log
77 are as follows:
78 .Bl -tag -width Ds
79 .It Fl c Ar commit
80 Start traversing history at the specified
81 .Ar commit .
82 The expected argument is the name of a branch or a SHA1 hash which corresponds
83 to a commit object.
84 .It Fl r Ar repository-path
85 Use the repository at the specified path.
86 If not specified, assume the repository is located at or above the current
87 working directory.
88 .El
89 .It Cm diff [ Ar repository-path ] Ar object1 Ar object2
90 Display the differences between two objects in the repository.
91 Each
92 .Ar object
93 argument is a SHA1 hash which corresponds to the object.
94 Both objects must be of the same type (blobs, trees, or commits).
95 If the
96 .Ar repository path
97 is omitted, use the current working directory.
98 .Pp
99 The key bindings for
100 .Cm tog diff
101 are as follows:
102 .Bl -tag -width Ds
103 .It Cm Down-arrow, j, Page-down, Space
104 Scroll down.
105 .It Cm Up-arrow, k, Page-up, Backspace
106 Scroll up.
107 .It Cm q
108 Quit the
109 .Cm diff
110 view.
111 .El
112 .It Cm blame [ Fl c Ar commit ] [ Ar repository-path ] Ar path
113 Display line-by-line history of a file at the specified path.
114 If the
115 .Ar repository path
116 is omitted, assume the repository is located in the current working directory.
117 .Pp
118 The key bindings for
119 .Cm tog blame
120 are as follows:
121 .Bl -tag -width Ds
122 .It Cm Down-arrow, j, Page-down, Space
123 Move the selection cursor down.
124 .It Cm Up-arrow, k, Page-up, Backspace
125 Move the selection cursor up.
126 .It Cm Enter
127 Switch to the
128 .Cm diff
129 view for the currently selected line's commit.
130 .It Cm b
131 Show the
132 .Cm blame
133 view for the version of the file in the currently selected line's commit.
134 .It Cm p
135 Show the
136 .Cm blame
137 view for the version of the file in the currently selected line's commit's
138 parent commit.
139 .It Cm B
140 Switch the
141 .Cm blame
142 view back to the previously blamed commit.
143 .It Cm q
144 Quit the
145 .Cm diff
146 view.
147 .El
148 .Pp
149 The options for
150 .Cm tog blame
151 are as follows:
152 .Bl -tag -width Ds
153 .It Fl c Ar commit
154 Start traversing history at the specified
155 .Ar commit .
156 The expected argument is the name of a branch or a SHA1 hash which corresponds
157 to a commit object.
158 .El
159 .It Cm tree [ Fl c Ar commit ] [ Ar repository-path ]
160 Display the repository tree.
161 If the
162 .Ar repository path
163 is omitted, assume the repository is located in the current working directory.
164 .Pp
165 The key bindings for
166 .Cm tog tree
167 are as follows:
168 .Bl -tag -width Ds
169 .It Cm Down-arrow, j, Page-down
170 Move the selection cursor down.
171 .It Cm Up-arrow, k, Page-up
172 Move the selection cursor up.
173 .It Cm Enter
174 Enter the currently selected directory, or switch to the
175 .Cm blame
176 view for the currently selected file.
177 .It Cm l
178 Switch to the
179 .Cm log
180 view for the currently selected tree entry.
181 .It Cm Backspace
182 Move back to the parent directory.
183 .It Cm i
184 Show the object IDs for all objects displayed in the
185 .Cm tree
186 view.
187 .El
188 .Pp
189 The options for
190 .Cm tog tree
191 are as follows:
192 .Bl -tag -width Ds
193 .It Fl c Ar commit
194 Start traversing history at the specified
195 .Ar commit .
196 The expected argument is the name of a branch or a SHA1 hash which corresponds
197 to a commit object.
198 .El
199 .El
200 .Sh EXIT STATUS
201 .Ex -std tog
202 .Sh SEE ALSO
203 .Xr got-repository 5
204 .Sh AUTHORS
205 .An Stefan Sperling Aq Mt stsp@openbsd.org